SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 code in vb script for getting servername and data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dasu
Posting Yak Master

104 Posts

Posted - 09/13/2004 :  07:17:54  Show Profile  Reply with Quote
please suggest me the code in vbscript for getting database connection
please.

spirit1
Cybernetic Yak Master

Slovenia
11750 Posts

Posted - 09/13/2004 :  10:24:58  Show Profile  Visit spirit1's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000