Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 code in vb script for getting servername and data

Author  Topic 

dasu
Posting Yak Master

104 Posts

Posted - 2004-09-13 : 07:17:54
please suggest me the code in vbscript for getting database connection
please.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-13 : 10:24:58
something like this:

dim connString = "Provider=SQLOLEDB;Persist Security Info=False;User ID=username;Password=pass;Initial Catalog=DatabaseName;Data Source=ServerName;"
set conn = new ActiveXObject("ADODB.Connection")
conn.Open(connString)

you'll probably need to do syntax check, but it should give you the right idea.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -