hi folks

Has  OleDb on (ObjAsm32) no support for DBASE IV ?

I use this connection string ;
$OCall(.pJet::OleDB.IniData, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\abs\best;Extended Properties=DBASE IV;")


i got error message 80040154 (Class Not Registered)

on my Autoit script the database is working fine with OLEDB.4.0

Kind Regards
jpam
Posted on 2009-08-04 16:05:50 by jpam
Hi
I talk with an OleDB expert and he told me that the OleDB object should connect to any provider w/o any restriction.
A short google session showed that there are some issues with DBASE IV files. Maybe you should look for some solutions in the net.

Regards,

Biterider
Posted on 2009-08-05 03:45:44 by Biterider
Humm, its interesting that AutoIT handles these files without problem.
Are you using V3.0? I'm willing to trace AutoIT execution and determine whats different here.
Supply me with a suitable script , with as little extra junk as possible.
Posted on 2009-08-05 04:30:18 by Homer
attachment has DBASE IV database file ,simple script source file and compiled version.

Kind Regards
jpam
Attachments:
Posted on 2009-08-05 12:44:17 by jpam
added better example with variable path to dbase file

first posted example had a hardcoded path

Kind Regards
jpam
Attachments:
Posted on 2009-08-05 15:55:25 by jpam
Hi
What I've found so far is that the current implementation of OleDB doesn't parse the connection string with all supplied parameters. Since these parameters are converted to DBPROP with a corresponding ID, I'm not able atm to translate the missing properties without researching more about these IDs.

Regards,

Biterider

Posted on 2009-08-06 04:14:56 by Biterider
OK, i found the missing property. "Extended Properties" is encoded as DBPROP_INIT_PROVIDERSTRING in the dwPropertyID field of DBPROP. This enables you to to use the "DBASE IV" switch we were looking for. Now we need to "SELECT" the database like in most of the examples in the net.

Regards,

Biterider

Reference: http://msdn.microsoft.com/en-us/library/ms725405(VS.85).aspx
Posted on 2009-08-06 10:26:59 by Biterider
I hope It Isn't to much work to implant the Extended Properties.

I use it alot in my programs :)

Kind Regards
jpam

Posted on 2009-08-06 10:29:10 by jpam
No problem... is was only a marginal change to include the "Extended Properties" in the connection string. Remember that this implementation expects a given order of the parameters (Provider, Data Source, Initial Catalog, User ID, Password, Extended Properties), so in your case it will be:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\masm32\ObjAsm32\aansteker\Nieuwe map;Extended Properties=DBASE IV;"

and the SELECT string will be:
"Select * FROM RODAM.dbf"


Attached is the modified OleDB object

Regards,

Biterider
Attachments:
Posted on 2009-08-07 01:22:30 by Biterider
Thanks for the quick fix BiteRider !

but...

I still get the same error with this call ;
mov .pJet, $New(OleDB, Init, 1)
    .if $OCall(.pJet::OleDB.IniData, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\masm32\ObjAsm32\aansteker;Extended Properties=DBASE IV;")
    @invoke MessageBox, NULL, "Connect error has occurred", "OleDB", MB_OK
    .endif


If i use this call with user and password before the Extended Properties
mov .pJet, $New(OleDB, Init, 1)
    .if $OCall(.pJet::OleDB.IniData, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\masm32\ObjAsm32\aansteker;User ID=Admin;Password=;Extended Properties=DBASE IV;")
    @invoke MessageBox, NULL, "Connect error has occurred", "OleDB", MB_OK
    .endif


Then the make.txt shows this error at asembling;

Assembling: DBaseIV.asm
STRING TYPE: ANSI
DEBUG MODE : INACTIVE
OOP LEVEL  : WINDOWS BASE
- ObjIDs.inc
- Primer.inc
- Steamable.inc
- WinPrimer.inc

Inheritance path: Primer
Inheritance path: Primer,Streamable
Inheritance path: Primer,Streamable,WinPrimer
Inheritance path: Primer,Stream
Inheritance path: Primer,Streamable,Collection
Inheritance path: Primer,Streamable,Collection,DataCollection
Inheritance path: Primer,OleDB
Inheritance path: Primer,Streamable,WinPrimer,WinApp
Inheritance path: Primer,Streamable,WinPrimer,WinApp,SdiApp
Inheritance path: Primer,Streamable,WinPrimer,WinApp,SdiApp,DBaseIV
DBaseIV.inc(224) : error A2041: string or text literal too long
MacroLoop(36): iteration 1: Macro Called From
  $PushMethodArgs(134): Macro Called From
  OCall(102): Macro Called From
    $OCall(1): Macro Called From
    DBaseIV.inc(224): Include File
DBaseIV.inc(224) : error A2006: undefined symbol : ??ArgSize
MacroLoop(107): iteration 1: Macro Called From
  $PushMethodArgs(134): Macro Called From
  OCall(102): Macro Called From
    $OCall(1): Macro Called From
    DBaseIV.inc(224): Include File
DBaseIV.inc(223) : error A2084: constant value too large
MacroLoop(17): iteration 1: Macro Called From
  $PushMethodArgs(134): Macro Called From
  OCall(9): Macro Called From
    $OCall(1): Macro Called From
    DBaseIV.inc(223): Include File
DBaseIV.inc(223) : error A2006: undefined symbol : ??ArgSize
MacroLoop(18): iteration 1: Macro Called From
  $PushMethodArgs(134): Macro Called From
  OCall(9): Macro Called From
    $OCall(1): Macro Called From
    DBaseIV.inc(223): Include File

And how do i call "Select * FROM RODAM.dbf"
can you please give me a little example ?

Kind Regards
jpam
Posted on 2009-08-07 14:54:07 by jpam
Hi
With the changes I outlined above, i opened the Rodam.dbf database without problems.
The OleDB.GetData performs the Select operation. The statment is within its parameters.
The error "DBaseIV.inc(224) : error A2041: string or text literal too long" message says clearly that the text you have in line 224 of DBaseIV.in is too long.

I'll suggest that you post the source of your project or send it to me via email, so i can take a closer look at what you are doing.

Regards,

Biterider
Posted on 2009-08-08 00:29:54 by Biterider
Email back

Biterider
Posted on 2009-08-08 03:02:03 by Biterider