By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

problem with SQLattr failed please help me!!!!!!

P: 3
Hello everyone,


Here is my coding just check anyone and tell me where is problem please send me email also on (please send me a PM) please do any one
Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT"%> 
  2. <!--#include file="Connections/ravi.asp" -->
  3. <%
  4. Dim raj
  5. Dim raj_numRows
  6.  
  7.  
  8. Set raj = Server.CreateObject("ADODB.Recordset")
  9. raj.ActiveConnection = MM_ravi_STRING
  10. raj.CursorType = 0
  11. raj.CursorLocation = 2
  12. raj.Source = "SELECT *  FROM employee"
  13. raj.LockType = 1
  14. raj.Open()
  15. raj_numRows = 0
  16. %>
  17. <script language="VBScript" type="text/VBScript">
  18. set.cnn = Server.CreateObject("ADODB.Connection")
  19. open.connection
  20. cnn.open("Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=D:\trupti.mdb;Uid=xxx;Pwd=xxx;" )
  21. "Driver= {MicrosoftAccessDriver(*.mdb)};
  22. DBQ=D:\trupti.mdb;Uid=xxx;Pwd=xxx;"
  23. open.recordset
  24. set raj = server.CreateObject("ADODB.Recordset")
  25. strSQL= "select * from employee"
  26. raj.open strSQL,cnn,3,2
  27. insert into employee('First_name','Last_name','Telephone','Email','Comments')
  28. values("&txtfname.txt&","&txtlname.txt&","&txtteleno.number&","&txtEmail.memo&","&txtComments.txt&")
  29. if NOT raj.eof Then
  30. while NOT raj.EOF
  31. raj.movenext
  32. wend
  33. end if      
  34. </script>
  35. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  36.  
  37.  
  38.  
  39.  
  40. <FORM METHOD="post" ACTION="test.asp">
  41.     First_name<INPUT TYPE="text" NAME="First_name"><BR>
  42.     Last_name<INPUT TYPE="text" NAME="Last_name"><BR>
  43.     Telephone<INPUT TYPE="text" NAME="Telephone"><BR>
  44.     Email<INPUT TYPE="text" NAME="Email"><BR>
  45.     Comment<INPUT TYPE="text" NAME="Comment"><BR>
  46.   <INPUT name="add" TYPE="submit" id="insert" VALUE="Insert">
  47. </FORM>
  48.  
  49.  
  50.   <%
  51. raj.Close()
  52. Set raj = Nothing
  53. %>
  54. </body>
  55. </html>
May 25 '07 #1
Share this Question
Share on Google+
1 Reply


jhardman
Expert 2.5K+
P: 3,405
Which line gives you an error and what is the error exactly?

Jared
May 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.