Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Databasing
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-02-2009, 04:28 AM
  #1
ajwposh
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 8
iTrader: (0)
ajwposh is an unknown quantity at this point
Error when run

Code:
"INSERT INTO an_test1 (First_Name, Surname, DOB, Address1, Address2, Address3, Town, County, PostCode, Telephone, Email, [Password]) VALUES ('"&fname&"','"&sname&"','"&dob&"','"&add1&"','"&add2&"','"&add3&"','"&twn&"','"&cnt&"','"&pc&"','"&tel&"','"&ema&"','"&pas&"') SELECT '"&username&"' = [user] FROM an_test1 INSERT INTO an_test ([Username], [Password]) VALUES ('"&username&"','"&pas&"')"
I get the error
Cannot use empty object or column names. Use a single space if necessary.

The SQL works for the first insert, however when i add the code to select username as user and insert into an_test I get this error.

The sql works when called from a stored procedure but not when the sql is embedded in the asp.
ajwposh is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:44 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.