In your project set a reference to Mocrosoft Activex Data Objects
Project>References
In your code:
Dim CN As ADODB.Connection
Dim RS As ADODB.Recordset
Dim strSQL
Set CN = New ADODB.Connection
Set RS = New ADODB.Recordset
CN.ConnectionString = "Provider=Microsoft.Jet.OL
"Data Source=" & "Path to your MDB"
CN.CursorLocation = adUseClient
CN.Open
strSql = "SELECT iBinNum FROM tBin WHERE (tBin.iBinStatus)=1"
RS.Open sSql, CN, adOpenDynamic, adLockOptimistic
text1.text = RS.Fields("iBinNum")
RS.Close
CN.Close
Set RS = Nothing
Set CN = Nothing
Main Topics
Browse All Topics





by: jwarnkenPosted on 2007-01-23 at 11:18:13ID: 18377954
check out http://www.vbcode.com/asp/ showsn.asp ?theID=113 40