Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What should be a simple Insert Into

Status
Not open for further replies.

okayDan

Programmer
Dec 13, 2000
2
US
Im doing an insert from an ASP form into an Access Database.

The SQL reads:

Insert into appear (Tour,perfDate,City,State,Venue,Notes,With) Values('The Roots','4/8/02','The Big Island','Hawaii','The nice Venue','With fine ladies','Trey Anastasio')

I get this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

The SQL works perfectly when I take the "With" field and value out ... the last one. There is certainly a "With" field in my Database. This has been driving me crazy!

Thanks!

Dan
 
With is a "Key Word" in SQL. As a 'bare naked' field it will cretainly cause a problem. You MAY be able to get around it by addressing it in the table.filed syntax, but then again you may also need to address all of the fields in this syntax.

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Michael,
Thanks. I figured it out not to long after I made the post. Still, ... I spent 3/4 of a day on it. Ugggggh. Boy it felt good to see it work. The last thing I am having trouble with is that I have a form for editing some information pulled from a previous page. Using Input boxes I populate the fields of the form. For some reason I only get partial strings, just the first word, in the input boxes. I do a response.write to check the data and its coming across complete.

For instance, a user wants to edit an entry in the database. The choose the entry and click the button. The next page displays the information for editing. One of the fields is Venue. Say the data was "Giant Stadium", ... only "Giant" appears in the text box. Im saying:

<Input id=venue name=venue value=<%=oRS(&quot;Venue&quot;)%>>

any ideas?

Thanks Again!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top