Author |
Topic  |
gelliott
Junior Member
 
USA
268 Posts |
Posted - 14 August 2003 : 12:25:37
|
quote: Originally posted by seahorse
planeSQL = planeSQL & "WHERE " planeSQL = planeSQL & "c.stype = 'aircraft'" planeSQL = planeSQL & " AND " planeSQL = planeSQL & "ac.category_id = c.id " planeSQL = planeSQL & "AND " planeSQL = planeSQL & "ac.aircraft_id = " & aircraft planeSQL = planeSQL & "AND " planeSQL = planeSQL & "l.id = lc.id_link "
Gee, guys, perhaps I'm missing something, but it seems to me the red text is missing a space and should match the green text. Otherwise the contents of "aircraft" and the subsequent AND will concatenate... I hate the little details - it takes all the fun out of programming!  |
* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.  |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 14 August 2003 : 14:35:20
|
You're correct gelliott, but seahorse had tried the sql query against the database (using phpmyadmin) and it works so that means the sql query is ok. Plus if that was the problem, it wouldn't give that kind of error that he posted in his first post.
Seahorse, here is what gremlin is suggesting your connection string look like: strConnString = "driver={MySQL ODBC 3.51 Driver};server=***.***.***.***;uid=***;pwd=***;database=***" '## MySQL
Of course you would replace the asteriks with the relevant data. |
Support Snitz Forums
|
 |
|
gelliott
Junior Member
 
USA
268 Posts |
Posted - 14 August 2003 : 21:22:28
|
Well, I saw that he had tried the sql query, but I figured he had to substitite a value in for the variable, and in the process he likely spaced it correctly, thereby helping overlook at least one potential error in the coding... I didn't catch that he was directing the planeSQL contents to Response.Write and pasting that.
Regardless, you're right (of course) that the error message is the true symptom and that's the solution he needs to find. Very well, I just thought I'd ask... |
* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.  |
 |
|
seahorse
Senior Member
   
USA
1075 Posts |
Posted - 15 August 2003 : 02:59:23
|
quote: Originally posted by Davio Seahorse, here is what gremlin is suggesting your connection string look like: strConnString = "driver={MySQL ODBC 3.51 Driver};server=***.***.***.***;uid=***;pwd=***;database=***" '## MySQL
OK, I've tried changing the driver string, but it didn't work.
here's a link to the <edited>test page</edited> with the ODBC 3.51 driver: here's a link to the a <edited>test page</edited> with the original driver:
The error message appears in the lower right hand nav bar. It may be hard to see because of the black text on the dark blue background.
I haven't the slightest idea why it's doing what it's doing. Am I using a prohibited keyword or something? Does the delete_flag column cause problems becuase DELETE is in there?
|
Ken =============== Worldwide Partner Group Microsoft |
Edited by - seahorse on 16 August 2003 03:29:41 |
 |
|
seahorse
Senior Member
   
USA
1075 Posts |
Posted - 15 August 2003 : 10:46:33
|
You know what? It semi-works if I comment out the SQL related to the delete_flag column.
The only problem is that it only brings up one record, when I know that there are 8. I'm still confused, but at least I'm making progress. |
Ken =============== Worldwide Partner Group Microsoft |
 |
|
seahorse
Senior Member
   
USA
1075 Posts |
Posted - 16 August 2003 : 03:31:54
|
Well, I've finally got it working. Thanks to everyone for all of their help and suggestions. They were very much appreciated.
the msSQL driver doesn't seem to like having the keyword "delete" appear in the SQL. When I removed the delete_flag column from the query, it started working after a few adjustments. |
Ken =============== Worldwide Partner Group Microsoft |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 16 August 2003 : 03:52:31
|
That would have been a hard one to catch. DELETE is a reserved keyword. I should remember that next time. |
Support Snitz Forums
|
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 16 August 2003 : 12:20:20
|
Defaintely one to write down for remembering in the future. |
Kiwihosting.Net - The Forum Hosting Specialists
|
 |
|
Topic  |
|