|
 |
asp_database_setup thread: ASP HELP!!!
Message #1 by "Isaac Sogunro" <isogunro@h...> on Fri, 06 Apr 2001 13:16:59 -0400
|
|
Hello. I am trying to process a form. Once a user clicks the submit button,
the information should be sent to an Access database. When the button is
actually clicked, a blank screen pops up and nothing gets inserted in
Access.
IS MY CONNECTION BELOW WRONG?
Please help. Thank you.
<body text="000000" bgcolor=orange>
<%
var objConn = Server.CreateObject("ADODB.Connection");
objConn.open("DSN=GenConf");
var mySQL = "INSERT INTO tblConf " +
"(RegistrationDate, LName, FName, PhNumber, DCMAOffice, EAddress,
GradeRank, JobTitle, SpecialNeeds)";
mySQL = mySQL + " VALUES (" Request.Form("DteReg") + "','";
mySQL = mySQL + Request.Form("LName") + "','";
mySQL = mySQL + Request.Form("FName") + "','";
mySQL = mySQL + Request.Form("Phone") + "','";
mySQL = mySQL + Request.Form("Office") + "','";
mySQL = mySQL + Request.Form("E_Address") + "','";
mySQL = mySQL + Request.Form("Grade") + "','";
mySQL = mySQL + Request.Form("Job") + "','";
mySQL = mySQL + Request.Form("Needs") + "')'";
objConn.Execute mySQL;
objConn.Close();
objConn = null;
Response.Write mySQL;
Response.Write("<H2><CENTER>Thank you for registering</CENTER></H2>");
%>
Message #2 by "charles" <skye@i...> on Sat, 7 Apr 2001 07:05:27 +1000
|
|
should'nt it be "set" rather than "var" -just a thought
charles
----- Original Message -----
From: "Isaac Sogunro" <isogunro@h...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Saturday, April 07, 2001 3:16 AM
Subject: [asp_database_setup] ASP HELP!!!
> Hello. I am trying to process a form. Once a user clicks the submit
button,
> the information should be sent to an Access database. When the button is
> actually clicked, a blank screen pops up and nothing gets inserted in
> Access.
> IS MY CONNECTION BELOW WRONG?
> Please help. Thank you.
>
> <body text="000000" bgcolor=orange>
> <%
> var objConn = Server.CreateObject("ADODB.Connection");
> objConn.open("DSN=GenConf");
>
> var mySQL = "INSERT INTO tblConf " +
> "(RegistrationDate, LName, FName, PhNumber, DCMAOffice, EAddress,
> GradeRank, JobTitle, SpecialNeeds)";
> mySQL = mySQL + " VALUES (" Request.Form("DteReg") + "','";
> mySQL = mySQL + Request.Form("LName") + "','";
> mySQL = mySQL + Request.Form("FName") + "','";
> mySQL = mySQL + Request.Form("Phone") + "','";
> mySQL = mySQL + Request.Form("Office") + "','";
> mySQL = mySQL + Request.Form("E_Address") + "','";
> mySQL = mySQL + Request.Form("Grade") + "','";
> mySQL = mySQL + Request.Form("Job") + "','";
> mySQL = mySQL + Request.Form("Needs") + "')'";
> objConn.Execute mySQL;
> objConn.Close();
> objConn = null;
>
> Response.Write mySQL;
> Response.Write("<H2><CENTER>Thank you for registering</CENTER></H2>");
> %>
>
>
Message #3 by "Ken Schaefer" <ken@a...> on Mon, 9 Apr 2001 22:40:30 +1000
|
|
If you have ON ERROR RESUME NEXT, please take it out. There are some errors
in your code that will become obvious if you do this...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Isaac Sogunro" <isogunro@h...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Saturday, April 07, 2001 3:16 AM
Subject: [asp_database_setup] ASP HELP!!!
: Hello. I am trying to process a form. Once a user clicks the submit
button,
: the information should be sent to an Access database. When the button is
: actually clicked, a blank screen pops up and nothing gets inserted in
: Access.
: IS MY CONNECTION BELOW WRONG?
: Please help. Thank you.
:
: <body text="000000" bgcolor=orange>
: <%
: var objConn = Server.CreateObject("ADODB.Connection");
: objConn.open("DSN=GenConf");
:
: var mySQL = "INSERT INTO tblConf " +
: "(RegistrationDate, LName, FName, PhNumber, DCMAOffice, EAddress,
: GradeRank, JobTitle, SpecialNeeds)";
: mySQL = mySQL + " VALUES (" Request.Form("DteReg") + "','";
: mySQL = mySQL + Request.Form("LName") + "','";
: mySQL = mySQL + Request.Form("FName") + "','";
: mySQL = mySQL + Request.Form("Phone") + "','";
: mySQL = mySQL + Request.Form("Office") + "','";
: mySQL = mySQL + Request.Form("E_Address") + "','";
: mySQL = mySQL + Request.Form("Grade") + "','";
: mySQL = mySQL + Request.Form("Job") + "','";
: mySQL = mySQL + Request.Form("Needs") + "')'";
: objConn.Execute mySQL;
: objConn.Close();
: objConn = null;
:
: Response.Write mySQL;
: Response.Write("<H2><CENTER>Thank you for registering</CENTER></H2>");
: %>
|
|
 |