You are here: irt.org | BBS | Re: MS FrontPage98/Access97 database error [This BBS is closed]
Posted by Tricia Newbre on July 09, 1998 at 09:38:25:
In Reply to: Re: MS FrontPage98/Access97 database error posted by Dan Ambrose on July 08, 1998 at 18:23:53:
: : : : : I need some help figuring out an error message I'm getting.
: : : : : I'm trying to set up an HTML form which collects information from the user, then posts it to an Access97 database. I've found a fairly useful article on the MS support site which goes through the process step by step, and I followed the procedure exactly (twice, in fact, just to be sure everything was correct.). When I filled out the sample form I had created, I got the following error message:
: : : : : Database Error: [Microsoft][ODBC Microsoft Access 97 Driver] The INSERT INTO statement contains the following unknown field name:
: : : : : 'FirstName'. Make sure you've typed the name correctly, and try the operation again.
: : : : : Can anybody give me a hint as to how to get this working?
: : : : : Thanks!
: : : : : Tricia Newbre
: : : : Im assuming your using ASP?
:
: : : : Make sure the field, 'FirstName' is in the database your inserting
: : : : information into. Case-matching. That's what that error usually means.
: : : : If you still cant find the problem please put
: : : : what put you put for the SQL statement.
: : : : your sql statement should look something like this:
: : : : Insert into TableName (FirstName) values (Dan) .....etc
: : : : thanks, and good luck!
: : : : Dan Ambrose
: : : Yeah, I'm using ASP. That's what I thought at first also - that I had spelled the lable differently or something. So I cut-and-pasted from the database into the SQL. Here's what the SQL statement looks like:
: : : Insert into Employees (FirstName, LastName, EmailName) values ('%%FirstName%%','%%LastName%%','%%EmailName%%')
: : : (This is basically a direct copy of the SQL statement in the article - I'm going through the sample exactly before I try using an actual DB.)
: : : Thanks for the help...
: : : Tricia Newbre
: : One other thing: I'm pretty sure the specific lable isn't the problem - I also tried cutting the form and database table down one field at a time, and got the same error each time, just with whatever lable happened to be the first. Kind of like it would hit the first form field, error out, and not go any further.
:
: Try a different name of the variable> Example
: Insert into Employees (FirstName) values (FirstName2)
: that might work. are those %%'s supposed to be there?
Dan,
Thanks for all your help....I'm not entirely sure why, but it seems to be working now. For anybody else that might have this problem, I replaced the '%%FirstName%%' with 'FirstName2' (exactly like the suggestion above). That returned values in all the data fields except the first one, which returned "FirstName2". So I went back and changed it back to '%%FirstName%%' and now it's working fine. I don't know why that fixed the problem, but it apparently did. Thanks again, Dan.
Tricia
Follow-ups:
You are here: irt.org | BBS | Re: MS FrontPage98/Access97 database error [This BBS is closed]