Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inner Join

Status
Not open for further replies.

glove

Technical User
Aug 24, 2000
42
US
When I use "Inner Join" in an SQL statement in VB 6 I get the error "Join Expression Not Supported". Doesn't VB support join expressions?
 
A little bit more information about your sql statement and the vb code would be helpful to help you. Cause you can create an InnerJoin sql statement within VB6, so I guess the problem is your code .... ;-)

Tom
 
It has nothing to do with VB but with the method you use to connect to your database.
 
Here is the code I'm using:

dim db as database
dim rs as recordset
dim sDBPath as string

sDBPath = App.Path & "\RA.mdb"
Set db = OpenDatabase(sDBPath)
Set rs = db.OpenRecordset("SELECT [ChartID], [Year] FROM tblChartofAccounts INNER JOIN [tblAccount-Chart-Master] ON tblChartofAccounts.ChartID = 'D1'")

 
Nevermind, it was just the syntax of my sql statement that was incorrect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top