Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-23-2007, 01:28 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default connect to dbf-file

Is there a way to connect and read data from a dbf file with swfkit and ado.
I tried with this connectionscript,
Code:
conn = new ActiveXObject("ADODB.Connection");
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\DPTest;Extended Properties='DBASE IV'");

var ds = new ActiveXObject("ADODB.Recordset");
ds.open("select * from dbfile.dbf", conn, 1, 2);
but with no luck so far.

the file I'm trying to read can be found http://www.oefeningen.net/dbfile.dbf

Reply With Quote
  #2 (permalink)  
Old 06-23-2007, 02:41 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:connect to dbf-file

Can this file be opened in Microsoft Access? Does it have an index file?
Reply With Quote
  #3 (permalink)  
Old 06-23-2007, 03:11 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:connect to dbf-file

I think it was created with Clipper. Cause it has some other files with extension *.ntx in the same directory
It's been generated with an old program for keeping scores.
I' don't know which version of dbase driver i should specify.

if i convert the file with dbf-viewer 2000 to dbase3, i can read it.
But i'ld like to be able to skip this conversion and work with the original file
Reply With Quote
  #4 (permalink)  
Old 06-25-2007, 10:12 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:connect to dbf-file

If you change the first byte of the dbf file from 0x25 to 0xF5, your code will work well, don't know why.
Reply With Quote
  #5 (permalink)  
Old 06-25-2007, 06:14 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:connect to dbf-file

Can this be done with swfkit.
Reply With Quote
  #6 (permalink)  
Old 06-26-2007, 12:30 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:connect to dbf-file

Sure.

Code:
var f = new FileStream("c:\\dbfile.dbf", "w");
f.put(0xF5);
f.close();
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:22 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.