Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and TSQL Query?

Status
Not open for further replies.

bowwow

IS-IT--Management
Jun 11, 2002
60
GB
Hi All

Is it possible to run a TSQL query (aka 'SELECT * FROM' etc) from within a VB Script. Ive made the following connection from the VB Script, is this the right method of connecting into SQL to then run the TSQL Query?

----------

strDBServerName = "."

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

-----------

Any pointers much appreciated.
Kind Regards
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top