ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old September 29th, 2003, 05:12 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to Pain
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
Attached Files
File Type: asp create_user_results.asp (3.5 KB, 211 views)

Reply With Quote
  #2  
Old September 29th, 2003, 07:43 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
read the attach file...

Hope this helps!
Sincerely

Vlince
Attached Files
File Type: asp tmp.asp (7.7 KB, 234 views)

Reply With Quote
  #3  
Old September 29th, 2003, 08:07 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to Pain
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..

Reply With Quote
  #4  
Old September 29th, 2003, 10:07 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to Pain
Fixed!

Bleh, the whole thing boiled down to the table name 'user' being reserved.

Putting []'s around it helps...a lot

Reply With Quote
  #5  
Old October 3rd, 2003, 02:59 AM
HackerNeo HackerNeo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 HackerNeo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old October 3rd, 2003, 03:27 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to Pain
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Can you help me bugfix this statement?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway