Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Help Needed... Urgently!!!! Pls


Message #1 by "Kunal Malhotra" <kmal5310@m...> on Sat, 30 Sep 2000 13:58:42 +1000
This is a multi-part message in MIME format.



------=_NextPart_000_0023_01C02AE6.8A75E240

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi!



i am a new member to your community. right now, i'm developing my own 

portfolio. The thing is that the first page is a form which requires the 

visitor to enter two things the first name and the last name which is 

then submitted to itself. I have checked and the values get passed but 

when it tries to open the databse it gives me an error saying the 

"parameters insufficient". i have tried using a lot of cursor and lock 

combinations but it doesn't work. kindly help me out. The thing is that 

i by mistake downloaded the new MDAC 2.5 German version and now it gives 

me errors in german which i dont understand. anyway the code is as 

follows: The place where i get an error is marked with (???)

Is it a cursor problem or is it something else. The complete error is as 

follows:



MICROSOFT OLE DB Provider for ODBC Drivers Error '80040e10'

[Microsoft] [ODBC Microsoft Access Driver] Parametros insufficientes. 

Eram esperados 2.



<html>

<head>

 <title>Kunal's Portfolio</title>

<!-- #include file=3D"adovbs.inc" -->

<%

fMsg =3D ""

iMsg =3D ""

errored =3D FALSE

visit =3D ""



' see whether the form has been submitted or not



checRec =3D UCase(Left(request.form("check"),1))

IF checRec =3D "Y" THEN

 IF request.Form("firstname") =3D "" THEN

  fMsg =3D "Please enter firstname."

  errored =3D TRUE

 ELSEIF request.Form("lastname") =3D "" THEN

  fMsg =3D "Please enter lastname."

  errored =3D TRUE

 ELSE

  fn =3D UCase(request("firstname"))

  ln =3D UCase(request("lastname"))

  response.write fn & ln

 END IF



 IF fMsg=3D"" THEN

  SET cnPort =3D server.createobject("ADODB.Connection")

  cnStPort =3D "driver=3D{Microsoft Access Driver (*.mdb)};" &_

     "dbq=3D" & server.mappath("portdb.mdb")

  cnPort.Open cnStPort, "", ""

 

  SET rItm =3D server.createobject("ADODB.Recordset")

  sql =3D "SELECT * FROM user " &_

    "WHERE (fname =3D " & fn & ") " &_

    " AND (lname =3D " & ln & ") ; "

  (???) rItm.Open sql, cnPort, adOpenDynamic, adLockOptimistic

 

  IF rItm.EOF THEN

   iMsg =3D "This is your first visit."

   visit =3D "first"

   addRec =3D UCase(Left(request.form("add"),1))

   IF addRec =3D "Y" THEN

    ' code to add a new record and redirect

   END IF

  ELSE

   ' code to redirect to the new page

  END IF

 

  rItm.close

  SET rItm =3D Nothing

 

  cnPort.close

  SET cnPort =3D Nothing

 END IF

END IF

%>

</head>

<body bgcolor=3D"white" text=3D"black">

<center>

<table width=3D"543" border=3D"0" cellpadding=3D"0" cellspacing=3D"0">

<tr>

 <td colspan=3D"3"><img src=3D"images/bannerad.gif" border=3D"0" 

alt=3D"This is the place for an advertisement"></td>

</tr>

<tr>

 <td colspan=3D"3" height=3D"20"><img src=3D"images/blackdot.gif" 

border=3D"0" alt=3D""></td>

</tr>

<tr>

 <td width=3D"409"><img src=3D"images/portasp.gif" border=3D"0" 

alt=3D"Kunal's Portfolio"></td>

 <td valign=3D"bottom"><img src=3D"images/vertical_line1.gif" 

border=3D"0" alt=3D""></td>

 <td align=3D"left" valign=3D"center" width=3D"124"><img 

src=3D"images/asplogo.gif" border=3D"0" alt=3D"This site has been 

developed using ASP"></td>

</tr>

<tr>

 <td colspan=3D"3"><img src=3D"images/horizontal_line.gif" border=3D"0" 

alt=3D""></td>

</tr>

<tr>

 <td>

 <table border=3D"0" width=3D"409" cellpadding=3D"0" cellspacing=3D"0">

 <tr>

  <td><font face=3D"verdana, century gothic, times new roman" 

size=3D"1">Hey! Welcome to my site. This site features my online 

portfolio. Before moving on kindly take a moment & register yourself.

  <br>Don't worry, I won't ask for your credit card number and won't be 

sending you any junk mails! This would just help me keep track of the 

visitors on my site.

  <br>Thank Q!</font></td>

 </tr>

 <tr>

  <%

  IF visit =3D "first" THEN

  %>

  <td height=3D"10" valign=3D"center"><font face=3D"verdana, century 

gothic, times new roman" size=3D"1">This is your first visit to my site. 

So please fill in these additional details as well. This will help me to 

establish contact with you.</font></td>

  <% ELSE %>

  <td height=3D"10"><img src=3D"images/blackdot.gif" border=3D"0" 

alt=3D""></td>

  <% END IF %>

 </tr>

 <tr>

  <td>

  <table border=3D"0" cellpadding=3D"0" cellspacing=3D"0">

  <tr>

   <td><img src=3D"images/blackdot.gif" height=3D"2" border=3D"0"><br>

   <%

   IF visit =3D "first" THEN

   %>

   <form method=3D"POST" action=3D"default.asp">

   <input type=3D"hidden" name=3D"check" value=3D"Y">

   <input type=3D"hidden" name=3D"add" value=3D"Y">

   <input type=3D"hidden" name=3D"firstname" value=3D"<%=3Dfn%>">

   <input type=3D"hidden" name=3D"lastname" value=3D"<%=3Dln%>">

   <table valign=3D"center" bgcolor=3D"E0E0E0" border=3D"0" 

cellpadding=3D"0" cellspacing=3D"0">

   <tr>

    <td align=3D"left"><img src=3D"images/company.gif" border=3D"0" 

alt=3D"Enter your company name here"></td>

    <td align=3D"left"><img src=3D"images/email.gif" border=3D"0" 

alt=3D"Enter your email address here"></td>

    <td></td>

   </tr>

   <tr>

    <td><input type=3D"text" name=3D"companyname" size=3D"9"></td>

    <td><input type=3D"text" name=3D"emailadd" size=3D"9"></td>

    <td></td>

   </tr>

   <tr>

    <td align=3D"left"><img src=3D"images/phone.gif" border=3D"0" 

alt=3D"Enter your phone no. here"></td>

    <td align=3D"left"><img src=3D"images/mobile.gif" border=3D"0" 

alt=3D"Enter your mobile no. here"></td>

    <td></td>

   </tr>

   <tr>

    <td><input type=3D"text" name=3D"phone" size=3D"9"></td>

    <td><input type=3D"text" name=3D"mobile" size=3D"9"></td>

    <td><input type=3D"image" src=3D"images/submit.gif" 

name=3D"submit"></td>

   </tr>

   <tr>

    <td colspan=3D"3" height=3D"10" align=3D"left"><img 

src=3D"images/blackdot.gif" border=3D"0" alt=3D""></td>

   </tr>

   </table>

   </form>

   <% ELSE %>

   <form method=3D"POST" action=3D"default.asp">

   <input type=3D"hidden" name=3D"check" value=3D"Y">

   <input type=3D"hidden" name=3D"add" value=3D"N">

   <table valign=3D"center" bgcolor=3D"E0E0E0" border=3D"0" 

cellpadding=3D"0" cellspacing=3D"0">

   <tr>

    <td colspan=3D"3" align=3D"left"><img src=3D"images/login.gif" 

border=3D"0" alt=3D"Login here"></td>

   </tr>

   <tr>

    <td align=3D"left"><img src=3D"images/firstname.gif" border=3D"0" 

alt=3D"Enter your firstname here"></td>

    <td align=3D"left"><img src=3D"images/lastname.gif" border=3D"0" 

alt=3D"Enter your lastname here"></td>

    <td></td>

   </tr>

   <tr>

    <td><input type=3D"text" name=3D"firstname" 

value=3D"<%=3Dserver.HTMLEncode(firstname)%>" size=3D"9"></td>

    <td><input type=3D"text" name=3D"lastname" 

value=3D"<%=3Dserver.HTMLEncode(lastname)%>" size=3D"9"></td>

    <td><input type=3D"image" src=3D"images/submit.gif" 

name=3D"submit"></td>

   </tr>

   <tr>

    <td colspan=3D"3" height=3D"10" align=3D"left"><img 

src=3D"images/blackdot.gif" border=3D"0" alt=3D""></td>

   </tr>

   </table>

   </form>

   <% END IF %>

   </td>

   <td><img src=3D"images/hmpg_pic1.gif" border=3D"0" alt=3D""></td>

   <td><img src=3D"images/hmpg_pic2.gif" border=3D"0" alt=3D""></td>

  </tr>

  </table>

  </td>

 </tr>

 </table>

 </td>

 <td background=3D"images/vertical_line2.gif"><img 

src=3D"images/blackdot.gif" border=3D"0" alt=3D""></td>

 <td>

 <table border=3D"0" cellpadding=3D"0" cellspacing=3D"0">

 <tr>

  <td><img src=3D"images/start.gif" border=3D"0" alt=3D"Start surfing 

thru my site here"></td>

 </tr>

 <tr>

  <td><img src=3D"images/dotline.gif" border=3D"0" alt=3D""></td>

 </tr>

 <tr>

  <td><img src=3D"images/knowme_hm.gif" border=3D"0" alt=3D"Get to know 

me a bit better"></td>

 </tr>

 <tr>

  <td><img src=3D"images/dotline.gif" border=3D"0" alt=3D""></td>

 </tr>

 <tr>

  <td><img src=3D"images/onres_hm.gif" border=3D"0" alt=3D"This is my 

online resume"></td>

 </tr>

 <tr>

  <td><img src=3D"images/dotline.gif" border=3D"0" alt=3D""></td>

 </tr>

 <tr>

  <td><img src=3D"images/onport_hm.gif" border=3D"0" alt=3D"This is my 

online portfolio"></td>

 </tr>

 <tr>

  <td><img src=3D"images/dotline.gif" border=3D"0" alt=3D""></td>

 </tr>

 <tr>

  <td><img src=3D"images/other_hm.gif" border=3D"0" alt=3D"Have fun 

visiting these links"></td>

 </tr>

 <tr>

  <td><img src=3D"images/dotline.gif" border=3D"0" alt=3D""></td>

 </tr>

 <tr>

  <td><a href=3D"#"><img src=3D"images/sms_hm.gif" border=3D"0" 

alt=3D"Send a SMS message on my mobile"></a><a href=3D"#"><img 

src=3D"images/mail_hm.gif" border=3D"0" alt=3D"Send me an email"></a><a 

href=3D"#"><img src=3D"images/learn_hm.gif" border=3D"0" alt=3D"Learn 

how this site works"></a></td>

 </tr>

 </table>

 </td>

</tr>

<tr>

 <td colspan=3D"3"><img src=3D"images/horizontal_line.gif" border=3D"0" 

alt=3D""></td>

</tr>

<tr>

 <td valign=3D"top" align=3D"center"><img src=3D"images/lower_bar.gif" 

border=3D"0" alt=3D""></td>

 <td valign=3D"top"><img src=3D"images/vertical_line1.gif" border=3D"0" 

alt=3D""></td>

 <td></td>

</tr>

</table>

</center>

</body>

</html>







  Return to Index