connection to an dbf database

Results 1 to 3 of 3

Thread: connection to an dbf database

  1. #1
    karthik Guest

    Default connection to an dbf database

    the following code is what i use to connect to a dbf database.<BR>i can view records from the database, but am unable to add records.<BR>i tried different cursors, but nothing working. also the ms jet provider does not work for the dbf database.<BR>do u have the solution ?<BR><BR>***************************************** **************<BR> set gvconn = server.createobject("ADODB.Connection")<BR> gvConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _<BR>"SourceType=DBF;SourceDB=d:lpc_dataweb_user;E xclusive=no;" <BR><BR>Set rsgv = Server.CreateObject("ADODB.Recordset")<BR><BR>rsgv .CursorType = adOpenForwardOnly <BR><BR>gvsqltext="Select * from d:lpc_dataweb_user"<BR><BR>rsgv.Open gvsqltext,gvconn<BR><BR>rsgv.addnew<BR>rsgv.fields (0).value="test"<BR>rsgv.fields(1).value="testt"<B R>rsgv.fields(2).value="testtt"<BR>rsgv.fields(3). value="testttt"<BR>rsgv.update<BR><BR>************ *****************************************

  2. #2
    Join Date
    Dec 1969

    Default RE: connection to an dbf database

    Could it be related to this?<BR><BR>

  3. #3
    karthik Guest

    Default it is working in a different way

    the below code is the final one for connecting and adding records to a dbase 3 version database.<BR>testing and working.<BR>i still have to check for deletion, but am sure it would work as well.<BR>thankz to Giancarlo for ur reply man.<BR><BR>but for other dumbos here is the code ;<BR><BR>&#060;%<BR>set oconn = server.createobject("ADODB.Connection")<BR>set oRs = server.createobject("ADODB.Recordset")<BR><BR>oCon n.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _<BR>"DriverID=277;" & "Dbq=d:lpc_data;"<BR><BR>&#039;Note: Specify the filename in the SQL statement.<BR><BR>oRs.Open "Select * From gvdet.dbf", oConn,1 ,2<BR><BR>oRs.addnew<BR>oRs.fields("voucher_no")=" 8888"<BR>oRs.fields("gv_no")="3333"<BR>oRs.update< BR>%&#062;<BR><BR>for guys who knew this is the one, next time be a bit more helpful.<BR><BR>enjoy coding......!!!<BR><BR>email :<BR>Website :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts