|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Can you help me bugfix this statement?
Hi guys
Im stuck. The following asp code is inserting data into 3 separate tables within access. When I try and run the code, it bugs out on line 106 stating that the insert statement is incorrect. However, i've done the smart thing to take the statement that it is posting to access and stuck it into a query within access itself, and it works fine. Think you guys could take a look at it? i've checked the remainder of the code and it works fine. The problems exist around strSQL3. Im thinking it could be the connection string (since the sql is fine).. Thanks Chris |
|
#2
|
|||
|
|||
|
read the attach file...
Hope this helps! Sincerely Vlince |
|
#3
|
|||
|
|||
|
Hi Vlince,
Thanks for your input, and im going through your alterations now. I can understand the importance of putting the SELECT @@IDENTITY within the same sql statement, but one of the reasons why I did it separately is because using the ';' character to bolt-on the next statement seems to cause errors with microsoft jet: Microsoft JET Database Engine (0x80040E14) Characters found after end of SQL statement. Incidentally, if i run what you've supplied previously, the same error message occurs. I've been thinking that perhaps the problem with my insert statement could be the way it is interpreted by the jet database program from the page to the database. I say this because after using the response.write functions I have cut n paste the insert statement into the query builder of access and it will run perfctly fine. I know that some data types like strings will require ' characters around the values. Perhaps this is what could be causing the problem? I've tried putting #'s around the dates, and removing the 's from numbers, but still doesnt work. Chris, clutching at straws.. |
|
#4
|
|||
|
|||
|
Fixed!
Bleh, the whole thing boiled down to the table name 'user' being reserved.
Putting []'s around it helps...a lot ![]() |
|
#5
|
|||
|
|||
|
Are you using SELECT in your SQL Statement if not this could be your error!
This is just an Idea I have found during my training in asp |
|
#6
|
|||
|
|||
|
Actually no, it wasnt a select statement at all - rather an insert statement.
I needed to find the PK ID number for it such that I could add it as a FK value to another table without some seriously hard code. Besides, its fixed now. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Can you help me bugfix this statement? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|