Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mapping database user to database
#5
Not Solved
The above statements only tell me how to connect and fetch data from DB, here is my script

Code:
Set Con = CreateObject("ADODB.Connection")  
Set rs = CreateObject("ADODB.Recordset")
Con.Open "Provider=SQLOLEDB;DBDatasource=XXXX;Database=master;Integrated Security = SSPI;DBOracle=false"
Con.Open connectionstring
SQL="Create Database XYZ"  --- the database XYZ gets created successfully
rs.open SQL, Con
Con.Close
Con.Open "Provider=SQLOLEDB;DBDatasource=XYZ;Database=XYZ;Integrated Security = SSPI;DBOracle=false;VNETClassLibrary=Standard"
SQL = "Create Login  <username> WITH PASSWORD = <'password'> , DEFAULT_DATABASE = XYZ "  --- the user gets created for database XYZ, however when verified in SQL Management studio the user is not mapped with the database
rs.open SQL, Con
Con.Close
Reply


Messages In This Thread
mapping database user to database - by kamalteja - 10-29-2010, 02:29 PM
RE: mapping database user to database - by KVK - 10-29-2010, 02:42 PM
RE: mapping database user to database - by kamalteja - 11-03-2010, 11:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  MDB database Fresher88 0 2,117 09-04-2012, 11:26 PM
Last Post: Fresher88
  SQL on oracle database doesn't return a value Bluefields 2 3,254 07-09-2012, 01:23 PM
Last Post: Bluefields
  Remote database conenction ajayr1982 1 2,643 05-21-2012, 12:14 AM
Last Post: ravi.gajul
  Array as User-Defined Environment Variables Arena 3 4,268 04-16-2012, 09:19 AM
Last Post: sshukla12
  Importing Data from a Database rajeshwar 8 19,470 04-03-2012, 12:23 AM
Last Post: qtp-qa

Forum Jump:


Users browsing this thread: 1 Guest(s)