954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ASP Join Problem?

I'm hoping someone can help me here.

I have 2 tables in a access database. I'm trying to join certain data points from both, simple. I've done a few joins already for this site. But the problem I'm having is this one seems to be destined to annoy me.

sql = "select synBLR.*, wFittings.* FROM synBLR INNER JOIN wFittings ON synBLR.master" & u_legs & "link = wFittings.ID WHERE synBLR.blrID = " & u_blrID &""
				
rs.Open sql, cn


The main table is synBLR, in this table there are 6 data columns I need, including master[2,3,4]link columns. User makes their selection in the form, and the data passes as normal to the asp code, no problems there. The problem is the MasterLink column is filled with IDs that refer to wFittings data. Again there are several data points I want out of wFittings. In short, 4 data points are entered by the user, theu_blrID, feet, inches, and u_legs. I checked with response write to make sure u_legs was being entered properly, so I'm fairly certain its good. But in the end I still keep getting the same error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/blp/roundslingc/mroundslingc.asp, line 32


Line 32 is the line that opens SQL statement.

Can someone please help me here?

hatrickwah
Newbie Poster
13 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

Keeping it simple may help:

SQL = "SELECT * FROM Table1 LEFT JOIN Table2 ON Table1.criteria = Table2.criteria Where Table1.Something = " & strSometing
ArtistScope
Junior Poster
150 posts since Jun 2010
Reputation Points: 5
Solved Threads: 14
 

Turned out it was an issue with Access database. I converted everything to MS SQL and the script work from then on. It seems Access has issues with Joins, I've had to trick the system into doing what I need, now the system seems to work just fine.

hatrickwah
Newbie Poster
13 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: