*syntax error in from clause* vb6 connect with ms access error
hi. can you please help me out with this program im writing.
its a simple log in system written in vb6 .
ms access is my database.
i have a problem with connecting vb to access.
heres the code:
/codes for module
Public db As ADODB.Connection
Public rec As ADODB.Recordset
Sub connect()
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "Provider = Microsoft.jet.OLEDB.4.0;data source = letmein.mdb;persist security info = false"
End Sub
/codes for the form
Private Sub Form_Load()
connect
sql = "select * from user"
Set rec = New Recordset
rec.Open sql, db, adOpenDynamic, adLockBatchOptimistic
End Sub
2
Contributors
2
Replies
1 Hour
Discussion Span
1 Year Ago
Last Updated
4
Views
Question Answered
Related Article:VB5 app can't connect to a password-protected Access 97 database
is a Visual Basic 4 / 5 / 6 discussion thread by GregDen that has 4 replies, was last updated 10 months ago and has been tagged with the keywords: access, connect, dao, data, object, password.