opening read/write dsnless dBase connection

Results 1 to 2 of 2

Thread: opening read/write dsnless dBase connection

  1. #1
    daniel prager Guest

    Default opening read/write dsnless dBase connection

    hi all-<BR><BR>i&#039m working on a project using a ms access database, and i&#039d like for users to be able to connect to the site, create dynamic recordsets (based on the information in the access database and user-input criteria) and download those records in dBase (.dbf) format. i have been able to create a dBase file (seperately) and then read that file using ASP/ADO, but i can&#039t figure out how to open a dBase file for editing. . . i&#039d appreciate any feedback. <BR> <BR>the code i use to open the recordset is:<BR><BR>&#060;%<BR>dPath = Server.MapPath("/wlip2/results")<BR>strConn = "DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=" & dPath & ";"<BR>Set dConn = Server.CreateObject("ADODB.Connection")<BR>dConn.O pen strConn<BR><BR>Set dRS = Server.CreateObject("ADODB.Recordset")<BR>dRS.Open "select * from BaseTable", dConn, 2, 3, 1<BR><BR>&#039this loop works fine<BR>For each dfld in dRS.fields<BR> Response.Write <BR>Next <BR><BR>&#039as does this one<BR>While not dRS.EOF<BR> Response.Write dRS("FIPS") <BR> dRS.MoveNext<BR>Wend<BR><BR>&#039but this loop generates<BR>dRS.MoveFirst<BR>While not dRS.EOF<BR> dRS("FIPS") = "7687"<BR> dRS.MoveNext<BR>Wend<BR>%&#062;<BR><BR>this error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC dBase Driver] Cannot update. Database or object is read-only. <BR><BR>/wlip2/results/dtest.asp, line 46 <BR><BR><BR>thanks.<BR>dan prager<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: opening read/write dsnless dBase connection

    I just found out today that Windows 2000 does *not* support writing to dBase databases. So if you are on Win2000 you are probably hosed. I have no idea if MS intends to change/fix this. Maybe not, as I am sure they consider dBase pretty obsolete by now.<BR><BR>

Posting Permissions

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