Connecting Tech Pros Worldwide Help | Site Map

Database Linking (DBF)

Newbie
 
Join Date: Sep 2007
Posts: 4
#1: Sep 19 '07
Hi Forum-

I am trying (my hardest) to connect an ACT database (DBF) to an ASP I created. I am totally new to the process - and it all seems to look right - but it won't link in and drop names on the database. I don't get it...and I have fried my brain coming up with alternatives.

Here is the code...and I have a submit page - which comes up and says submitted - but it doesn't link to the database. Any help would be really appreciated.

thanks
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>Untitled Document</title>
  7. </head>
  8. <%
  9. Function OpenDBFConn(Path)
  10.   Dim Conn: Set Conn = CreateObject("ADODB.Connection")
  11.   Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  12.                    "Data Source=shcil" & Path & "c:\inetpub\wwwroot\contacts" & _
  13.                    "Extended Properties=""DBASE IV;"";" 
  14.   Set OpenDBFConn = Conn
  15. End Function
  16. %>
  17. <form action="submit.asp" method="post" name="shcil">
  18. <style type="text/css">
  19. .style1 {font-family: Arial, Helvetica, sans-serif}
  20. .style2 {font-family: Arial, Helvetica, sans-serif; font-weight: bold;}
  21. </style>
  22. <body>
  23. <p class="style2">Contact Database </p>
  24. <p class="style1">Please fill in the following fields:</p>
  25. <p class="style1"><input name="Name" type="text" id="Name" value="CONTACT FULL NAME" size="40">
  26. &nbsp;</p>
  27. <p class="style1">
  28.   <input name="COMPANY" type="text" id="COMPANY" value="COMPANY" size="40">
  29. </p>
  30. <p class="style1">
  31.   <input name="ADDR1" type="text" id="ADDR1" value="STREET ADDRESS" size="40">
  32. </p>
  33. <p class="style1">
  34.   <input name="CITY" type="text" id="CITY" value="CITY" size="40">
  35. </p>
  36. <p class="style1">
  37.   <input name="STATE" type="text" id="STATE" value="STATE" size="40">
  38. </p>
  39. <p class="style1">
  40.   <input name="ZIP" type="text" id="ZIP" value="ZIP CODE" size="40">
  41. </p>
  42. <p class="style1">&nbsp;</p>
  43. <p class="style1">&nbsp;</p>
  44. <p class="style1">&nbsp;<input name="Submit" type="submit" value="Submit">
  45. </p>
  46.  
  47. </body>
  48. </html>
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Sep 20 '07

re: Database Linking (DBF)


Please use the code tags to display your code (notice the button marked --#--).

this is ASP.NET, rather than classic ASP right?

Jared
Newbie
 
Join Date: Sep 2007
Posts: 4
#3: Sep 20 '07

re: Database Linking (DBF)


Gotcha - thanks - I think you did it for me already.

Yes - this was started in ASP.NET but it doesn't have to be - I will try anything at this point to link into a DBF.

Thanks again
ilearneditonline's Avatar
1. Expert
 
Join Date: Jul 2007
Location: Atlanta
Posts: 132
#4: Sep 20 '07

re: Database Linking (DBF)


Quote:

Originally Posted by ekcunha

Expand|Select|Wrap|Line Numbers
  1. <%
  2. Function OpenDBFConn(Path)
  3. Dim Conn: Set Conn = CreateObject("ADODB.Connection")
  4. Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  5. "Data Source=shcil" & Path & "c:\inetpub\wwwroot\contacts" & _
  6. "Extended Properties=""DBASE IV;"";" 
  7. Set OpenDBFConn = Conn
  8. End Function
  9. %>
  10.  

You may want to try this LINK to have a look at the connection string.
Newbie
 
Join Date: Sep 2007
Posts: 4
#5: Sep 26 '07

re: Database Linking (DBF)


Quote:

Originally Posted by ilearneditonline

You may want to try this LINK to have a look at the connection string.


Thank you very much - I think this just may work for me.
Reply