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

ASP anyone?

Status
Not open for further replies.

joecdn

Programmer
Oct 28, 2003
47
CA
I'm not sure if anyone knows this, but I'm trying to insert a record into a FoxPro 2.6 database using ASP. I tried the regulat Insert command, but that doesn't seem to work. So, I'm trying this method, which I think is closer, but no cigar. Here's the code I have.

Dim ConString
Dim adoCon
Dim DataBase

DataBase = "C:\Inetpub\' nl_staff is the FoxPro database
ConString = "Driver=Microsoft Visual FoxPro Driver;"
ConString = ConString & "SourceType=DBF;SourceDB=" & DataBase
ConString = ConString & ";Exclusive=NO;Deleted=YES;NULL=No;BackgroundFetch=No;"

Set adoCon = Server.CreateObject("ADODB.Connection")

Set RS=Server.CreateObject("ADODB.Recordset")
SQLQuery="Select * from C:\Inetpub\' I think these next 2 declarations need to be properly picked in order for it to work
RS.CursorType = adOpenUnspecified
RS.LockType = adLockUnspecified
RS.Open SQLQuery, adoConn

RS.AddNew
RS.Fields("cnumber") = request.form("txtrepnum")
RS.Fields("sname") = request.form("txtlast")
RS.Fields("sfname") = request.form("txtfirst")
RS.Fields("webpass") = pv
RS.Update

Any insight would be great. Thanks in advance.
 
Joe,
Since this really has nothing to do with FoxPro 2.x (other than the data - which is basically just a generic xBase .DBF), you'd probably be better off asking on a VB or ASP forum.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top