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

Passing URL Parameter 1

Status
Not open for further replies.

MarkMeerten

Programmer
Aug 20, 2003
37
0
0
BE
Hello,
I made an asp page to insert a record to a SQL DB. The server behavior "insert record" has an option "After inserting, Go To:"
I entered another asp page and clicked on the "Parameters" button. I entered the parameter's name and a value of the recordset.
This other page uses the URL parameter to build a new recorset.

The code generated by dreamweaver is the folowing:

MM_editRedirectUrl = "/personeel/verlof_bevestiging.asp?persnr=" + (rsVerlof.Fields.Item("Tpers_nr").Value) + ""

When i test the application i get the following fault:
"Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'Tpers_nr'.
/personeel/verlof_bevestiging.asp, line 20"


I think this is caused by the messed up URL. It looks like this:

What's wrong? I presumed that the code wich is generated by DW is always correct?

What should be the correct syntax to pass this parameter?

Greetz,
 
I presumed that the code wich is generated by DW is always correct?

Hmm maybe not always depending on what you create it with.. Try this

Code:
MM_editRedirectUrl = "/personeel/verlof_bevestiging.asp?persnr=" & (rsVerlof.Fields.Item('Tpers_nr').Value)

Cheech

[Peace][Pipe]
 
thanx
the second fault i made is to declare my recordset afther my insert function ...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top