![]() |
mapping database user to database - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: mapping database user to database (/Thread-mapping-database-user-to-database) |
mapping database user to database - kamalteja - 10-29-2010 Hi, Though this is database query, i'm running this as part of my vb script, i've created sqldatabase user using SQL = "Create Login sample1 WITH PASSWORD = 'Welcome1' , DEFAULT_DATABASE = DEMO " The database user gets created successfully, however it is not mapped with the database when i verify. using sql server 2005 sp1, i've verified in sql management studio after database user creation whether the user is mapped or not, and its not. RE: mapping database user to database - KVK - 10-29-2010 Hi Teja, If you are using ADODB connection in Vbscript, refer to the below site to get the correct database string to be used for 2005sp1. http://connectionstrings.com/ Get the connection string from the above site and use it Thanks Vinod RE: mapping database user to database - kamalteja - 11-01-2010 Hi, Yes i'm using ADODB connection and i'm able to establish the connection and create database user name and password. They are visible, however, when i check in SQL Management Studio, the user is not mapped with the database which i used while creating the user RE: mapping database user to database - MVChowdary - 11-01-2010 Hi, See below code, it works fine. Code: ' Connect to the flight 32 database RE: mapping database user to database - kamalteja - 11-03-2010 The above statements only tell me how to connect and fetch data from DB, here is my script Code: Set Con = CreateObject("ADODB.Connection") |