We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,167 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

*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
yeeitsneo
Light Poster
37 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

try to rename the table to something else.

USER is predefined keyword.

debasisdas
Posting Genius
6,968 posts since Feb 2007
Reputation Points: 722
Solved Threads: 457
Skill Endorsements: 20

try to rename the table to something else.

USER is predefined keyword.

thank you so much sir!
:D im new to this.
thaaanks! :)

yeeitsneo
Light Poster
37 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 1 Year Ago by debasisdas

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0583 seconds using 2.65MB