Author |
Topic |
AnonJr
Moderator
United States
5768 Posts |
Posted - 13 June 2007 : 20:12:03
|
Double-check the DBS file - it looks like its trying to create the same table twice and that may be causing the error.
As to the database, you would have to be using MySQL to get MySQL errors... unless I'm really missing something.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 17 June 2007 : 22:05:06
|
quote: Originally posted by seanbol
Here is my error when I click on the link recipe.asp
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1
/forum/recipe.asp, line 1902
I'm getting the same error. I'm using Windows and IIS server.
I'm not getting any errors in setting up the database though.
< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 18 June 2007 : 14:41:20
|
I'm not sure why I'm getting that error. I'm using Snitz v3.4.06 also and I also have the Active Users mod. The Active Users mod is working fine.
I am using Mysql, but I don't think that makes a difference.
I was able to get into the main menu of the Recipe mod by commenting out the lines which were producing the error, but after I selected "Add New Recipe" and filled it out, I got another error when I tried to submit it. (That could be because of a null value maybe because of no new records?)
Anyway, there are several different types of mods that I would like to design using this as a prototype, but I can't even get this one working. < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 18 June 2007 : 14:50:43
|
Did you get the same message as seanbol when you ran the DBS script?< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 18 June 2007 : 16:37:37
|
No, I keep getting the same error below as he got. I get this everywhere there is a "SHOW = " statement in the syntax. I can comment these statements out (and the code around them) to get to the Recipe main menu, but I can't do anything which involves the database table. I get the form to add a new recipe and I can fill it out. But when I hit submit, I get an error.
"Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1
/forum/recipe.asp, line 1902 "
To be honest I don't remember how it went when I first ran the DB script. I've run a couple of more times and it doesn't report any errors.
< |
Edited by - CodeMan7 on 18 June 2007 16:40:40 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 18 June 2007 : 18:13:24
|
I'm not as familiar with MySQL as I'd like to be... I wonder if the SHOW keyword is one of those issues like "TOP". Might be worth looking into.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 18 June 2007 : 20:43:37
|
I'm not much help, Anon. I've been away from coding for a long time. But all the errors seem to point to the part of the syntax that has "SHOW = 1" or "SHOW = 0".
I did find something else. When I went to drop the tables, the first one did not exist, according to the script. When I added them back in, it said the first table existed. The other three tables were fine.
I keep trying to drop the tables and recreate them. No matter what I do, I get the message "table already exists" when I try to create 'Recipe'. Other than that, I get no errors when setting up the tables.
So the problem is not only with the syntax but also the first table is being created wrong.
< |
Edited by - CodeMan7 on 18 June 2007 21:15:09 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 June 2007 : 04:18:52
|
Response.write that SQL string and the problem may become apparent or post it here if not.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 06:20:58
|
Also, did you go into whatever DB manager you use and check to see if the tables really do exist?< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 13:15:58
|
Yes, I was just going to post that. I dumped the whole Snitz database last night. I went through it line by line. The Recipe table does not exist. The other 3 recipe tables do, i.e. Recipe_Categories, Recipe_Rating, Recipe_Subcategories.
I also cleared my Firefox cache. So I don't understand how it could say that the table exists.
I was thinking that maybe I should just put the Recipe table into what I dumped last night and rebuild the whole database. On the other hand, with all the syntax errors, I wonder if it is worth it?
If others have gotten this installed, I wonder what is different about their setup? < |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 13:27:01
|
quote: Originally posted by Shaggy
Response.write that SQL string and the problem may become apparent or post it here if not.
Shaggy, here is the error:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [MySQL][ODBC 3.51 Driver][mysqld-5.0.41-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1 /forums/recipe.asp, line 1045
Here is the line the error is referring to: strSQL = "SELECT COUNT(RECIPE_ID) AS RECIPESCOUNT FROM " & strTablePrefix & "RECIPE WHERE POST_DATE LIKE '" & left(datetostr(curDate),8) & "%' AND SHOW = 1"
Do you think it is because the author used "SHOW" as a field in the table?
< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 14:29:21
|
If that particular table doesn't exist, that may be it...
Also, is it always the "SHOW" keyword that causes the errors?
I'm starting to think there may be an error in the DBS script that creates the tables. If I remember tonight I may take a look.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 14:38:55
|
Most of the errors involve the "SHOW" part.
seanbol said that he got this error: -2147217911 | [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int
Interesting that this error also involves "SHOW". If I could just get the Recipe table created correctly, I might be able to figure out the other errors.
BTW, it looks like SHOW is always either "1" or "0", so he must be using it for a 'true' or 'false' field.
One solution might be to change "SHOW" to "isSHOW" in the table. Then do a search and replace for "SHOW" in the asp files.
Anything you can come up with would be appreciated Anon.
Thanks.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 15:44:20
|
UPDATE! I changed "SHOW" to "ISHOW" in dbs_recipe.asp. Then I went to admin options and ran the Recipe mod setup. (All tables created successfully.) Before I did anything else. I went through recipe.asp, admin_recipe.asp, and pop_recipe.asp and did a search and replace using "SHOW" and "ISHOW". (There are some instances of "show" in lower case. I didn't change those.)
Then I went into Recipe book and the menus came up. I was able to add a recipe, rate a recipe and create categories and subcategories.
I'm still getting some errors, but at least now I can see what I am working with.< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 16:20:40
|
I wonder if SHOW is a reserved word in MySQL? Just about all of the successful installs I know of were on either Access or MS SQL Server - so it could be that these are just MySQL issues.
If you see the word "show" in the SQL statement, it should be cased the same in all queries. In general, Access and MS SQL Server don't care (but they can be made to); and in general MySQL does care (but it can be made not to). Its a good habit to treat SQL statements like they all care - that way you are either right or pleasantly surprised. < |
|
|
Topic |
|