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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP post method

Status
Not open for further replies.

eekthecat

Programmer
Nov 13, 2000
45
US
Hi,

I've made a form and i want to send it with the post method.
Another asp file retreves the data and procesess it. The problem is in the beginning... I can't retreve the data. I think it has to do with the connection with the database. Could somebody look at it please?

This is the code, it dutch so don't be fooled if you thought it was drunk or something like that!


<%
' stap 0 variabelen aanmaken (hun scope = alleen in dit bestand)
dim cnDb
dim cmAddToDB
dim strInsertSQL

' Stap 3 Verbinding maken
set cnDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
cnDB.ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=&quot; & Server.MapPath(&quot;cnDB.open

' Stap 1 opvragen van velden
var_naam= Request.Form(&quot;naam&quot;)
var_naam= &quot;'&quot; & var_naam & &quot;'&quot;
var_adres= Request.Form(&quot;adres&quot;)
var_adres= &quot;'&quot; & var_adres & &quot;'&quot;

' Stap 2 SQL statement + Stap 1 opvragen van velden
strInsertSQL = &quot;INSERT INTO kapvergunning(ondergetekende, adres) VALUES (&quot; & var_naam & &quot;,&quot; & var_adres & &quot;);&quot;

' Stap 4 uitvoeren
set cmAddToDB = Server.CreateObject(&quot;ADODB.Command&quot;)
set cmAddToDB.ActiveConnection = cnDB
cmAddToDB.CommandText = strInsertSQL
cmAddToDB.Execute

' Stap 4B Alles weer legen
set cnDB = Nothing
set cmAddToDB = Nothing
%>


I'm using a personal webserver and my database is allso lokated in the ODBC system DSN.

Thank you in advance!
 
What error is it giving ?? Unicorn11
abhishek@tripmedia.com

[red]Nothing is permanent in life except Change[red]
 
This is the error code it gives back:

Server.MapPath() error 'ASP 0173'

Invalid Path Character

/addkapvergunning(volledig).asp, line 16

An invalid character was specified in the Path parameter for the MapPath method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top