What's wrong with this code

G

Guest

the code is this..

<html><

Set Conn = Server.CreateObject ("ADODB.Connection"
Conn.Open Application ("text_ConnectionString"

Set RS = Conn.Execute ("SELECT * From form_results.txt"

Dim iCn
Do Until RS.EO
iCnt = iCnt +
Name = RS("Name"
Email = RS("Email"
Comments = RS("Comments"
File = RS("File"
RS.MoveNex
Loo

RS.Clos
Conn.Clos
%

The error returned is this...

Error Type
Microsoft OLE DB Provider for ODBC Drivers (0x80004005
[Microsoft][ODBC Text Driver] In the text file specification 'form_results.txt', the ColNameHeader option is invalid
/test/process1.asp, line

Line 7 looks like it's ok but I am looking through very newbie eyes

Michelle
 
J

John H

It looks like you're using the MS article on sending form
results to a database and an email address and use the
file upload component simultaneously?

The problem may occur if you have misspelled a column
name somewhere. Make sure that names are all the same in
the input form, schema.ini, database etc...

-----Original Message-----
the code is this...

<html><%

Set Conn = Server.CreateObject ("ADODB.Connection")
Conn.Open Application ("text_ConnectionString")

Set RS = Conn.Execute ("SELECT * From form_results.txt")

Dim iCnt
Do Until RS.EOF
iCnt = iCnt + 1
Name = RS("Name")
Email = RS("Email")
Comments = RS("Comments")
File = RS("File")
RS.MoveNext
Loop

RS.Close
Conn.Close
%>


The error returned is this....

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Text Driver] In the text file
specification 'form_results.txt', the ColNameHeader
option is invalid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top