Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: SQLOLEDB.1
Given the following information: Provider=sqloledb Network=dbmssocn data source = datasourcename, 2222 initial catalog=packaging userid= pw=I'd like to query this database for a piece of information from multiple tables. Hope I'm saying that right.
Basically, the db holds the name of packages. Each package has a status. I'd like to query the status of each package. Is there a way to do this with the info I've provided, or am I barking up the wrong tree?
mySQLConn = CreateObject('ADODB.Connection') mySQLRS = CreateObject('ADODB.Recordset') mySQLRS.CursorLocation = 3 mySQLConn.Provider = "SQLOLEDB.1" mySQLConn.ConnectionString = "Provider=SQLOLEDB.1; Network Library=dbmssocn;Password=YOURPWD;User ID=YOURID;Initial Catalog=YOURCATALOG;Data Source=YOURSERVER;" ;mySQLConn.ConnectionString = "Provider=SQLOLEDB.1; Data Source=[servername]; Initial Catalog=[database]; Integrated Security=SSPI;" ;Windows authentication instead of a username password mySQLConn.Open() SQLText = StrCat(" Select whatever from whatever where whatever ") mySQLRS.Open (SQLText, mySQLConn, adOpenStatic, adLockReadOnly, adCmdText) If mySQLRS.EOF == @FALSE Then package = mySQLRS.GetString() Message("HELLO", package) EndIf mySQLRS.Close mySQLConn.Close() mySQLRS = 0 mySQLConn = 0
Article ID: W17105
File Created: 2012:11:06:10:31:44
Last Updated: 2012:11:06:10:31:44