Using Visual Basic 6.0 to Access CONNX Data Sources CONNX 8.9 …
Short Description
The following screen shot contains sample code using ADO* technology in Visual Basic 6.0. In the. example, MYDSN is a DSN created on your computer. …
Website: www.connx.com | Filesize: 212kb
Content
Using Visual Basic 6.0
to Access CONNX Data Sources
CONNX 8.9
Quick Reference Card
The following screen shot contains sample code using ADO* technology in Visual Basic 6.0. In the example, MYDSN is a DSN created on your computer. MYUSER and MYPASSWORD are valid CONNX user names and passwords. MYTABLE is any table located in a CONNX Data Dictionary (CDD). A connection string must be used with a connection object to open a connection to a server. A recordset requires a SQL query string and an open connection object to retrieve a recordset from a server.
*To activate ADO in Visual Basic, select References under Project on the File menu. Select the check boxes for Microsoft ActiveX Data Objects Library and Microsoft ActiveX Data Objects Recordset Library. Click the OK button.
Public Sub ConnectToDb()
Dim con as new ADODB.Connection
Dim rec as new ADODB.Recordset
Dim strConnection as string
Dim strSQLQuery as string
strConnection = “DSN=MYDSN;UID=MYUSER;PWD=MYPASSWORD”
strSQLQuery = “SELECT * FROM MYTABLE”
con.Open strConnection
rec.Open strSQLQuery, con
End Sub
CONNX Solutions, Inc.
2039 152nd Avenue NE
Redmond, WA 98052
425/519-6600
www.connx.com
. CONNX Solutions,…
Get the file Download here
Related Books:Related Searches: activex data objects, microsoft activex, ado technology, query string, data dictionary
Comments
Leave a Reply