views:

398

answers:

2

Hi there,

Usually i use SQL Server as database for my project, but one of my project deals with ESRI shapefile that use .dbf format as database (i think it was DBASE III or IV format).

I want to create some web interface for modifying value that already exist on dbf, example was make customer can edit street name if it were incorrect or address for several places.

In past i already have Classic ASP 3.0 application running and i want to integrate the new feature.

My question:
1. What is connection string (DSN-less more preferable) for interacting to DBF?
2. Can someone give me examples for retrieving/updating record?

I already read this:
http://www.intermedia.net/support/kb/default.asp?id=761 and
http://www.motobit.com/tips/detpg_asp-dbf-database/

None has working, at present my code was something like this (not working):


Set connDBF1 = Server.CreateObject("ADODB.Connection")
connDBF1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\digimap;Extended Properties=""DBASE IV;"";"
connDBF1.Open

Set connDBF2 = Server.CreateObject("ADODB.Connection")
connDBF2.ConnectionString = "DBQ=D:\digimap;DefaultDir=D:\digimap;Driver={Microsoft dBase Driver (*.dbf)};ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;Threads=3;UserCommitSync=Yes;"
connDBF2.Open

set rs = connDBF1.Execute("SELECT * FROM taspat_ka_jawa") 
set rs = connDBF2.Execute("SELECT * FROM taspat_ka_jawa") 

The error was

Microsoft JET Database Engine error '80040e37' 

The Microsoft Jet database engine could not find the object 'taspat_ka_jawa'. Make sure the object exists and that you spell its name and the path name correctly. 

test_dbf.asp, line 11

I'm pretty sure that "taspat_ka_jawa" was already in "D:\digimap"


Solved
I use Advantage ADO for OleDB Provider, it works fine, i can view/edit/delete record(s) now
http://www.sybase.com/products/databasemanagement/advantagedatabaseserver/ole-db-provider

Thanks, Dels

+1  A: 

These two together may help:

http://www.tek-tips.com/viewthread.cfm?qid=987761&page=6

http://www.carlprothman.net/Default.aspx?tabid=87

Remou
1st link, likely same with my code, only my code isn't work<br>2nd link was so helpfullthanks
Dels
+1  A: 

You might try the Microsoft Visual Foxpro Ole Db Provider. VFP is (to a certain extent) compatible with dBase files.

Eyvind