Page 2 of 3

Re: Ado Sample / ejemplo Ado

Posted: Tue May 19, 2009 6:43 am
by mol
:cry: It doesn't work:

Code: Select all

	oConexion = TOleauto():New('ADODB.Connection')                    	
	oConexion:ConnectionString ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Plu.DB;Extended Properties=Paradox 5.x;"
	oConexion:Open()

and I have no idea why....

I've changed:

Code: Select all

	oConexion:ConnectionString ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\projekty\paradox;Extended Properties=Paradox 5.x;"
I found, that Data Source in connection string must be only path to files!
Changed, and it works!!!!

Many thanks!


PS. I've got problem with polish native characters - how to resolve it?

Re: Ado Sample / ejemplo Ado

Posted: Tue May 19, 2009 12:14 pm
by luisvasquezcl
is correct
you must change the data source for your path.
About the polish language, i dont know how gived solution...
May be Roberto can you help.
Regards,
Luis Vásquez.

Re: Ado Sample / ejemplo Ado

Posted: Tue May 19, 2009 12:42 pm
by esgici
Hi Marek
mol wrote: PS. I've got problem with polish native characters - how to resolve it?
Did you tried HB_OEMTOANSI() ?

( If your PDX file came from DOS )

Regards

--

Esgici

Re: Ado Sample / ejemplo Ado

Posted: Tue May 19, 2009 1:00 pm
by mol
My pdx file came from windows application.
I've tried HB_OEMToANSI(), but it doesn't look good.

I was watching .db file using simple hex viewer and I wrote conversion procedure, but I think, paradox driver for windows converts character - but wrong...
I will write tomorrow working converter...

Re: Ado Sample / ejemplo Ado

Posted: Tue May 19, 2009 9:55 pm
by Vanguarda
Thanks luisvasquezcl for sharing with us.



with best regards,

Re: Ado Sample / ejemplo Ado

Posted: Wed May 20, 2009 5:28 am
by mol
I've prepared simple database containing 18 records - for 18 native polish characters.
I've got very stupid results opening this database with my program.
Opening the same database with MS Excel gives also strange results.

I think, it's caused by OLE driver...

Re: Ado Sample / ejemplo Ado

Posted: Wed May 20, 2009 12:27 pm
by luisvasquezcl
Vanguarda Thanks for your words.
Mol, I think it is the driver that is causing problems,
Roberto said that the matter?

Re: Ado Sample / ejemplo Ado

Posted: Thu May 21, 2009 6:15 am
by mol
I've tried to connect via ODBC drivers. It causes the same problems with version for Parado 5.x and 7.x.
I must hang this theme...

Re: Ado Sample / ejemplo Ado

Posted: Fri May 22, 2009 11:18 pm
by Vanguarda
Hi luisvasquezcl,

Thank for this nice example. It will be very useful for me.


with best regards,

Re: Ado Sample / ejemplo Ado

Posted: Tue Mar 22, 2016 7:40 pm
by Ismach
someone could connect to database paradox? My code is this but it shows me an error

Code: Select all

     oPConn:= TOleauto():New('Adodb.Connection')
     oPConn:ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Gamdesa\GamTest;Extended Properties=Paradox 5.x;"
     oPConn:Open()
     
     ccSQL  := "Select Nutab, Posi, Norubr, Cle, Occurs, Type, Long, Dec, Signe From Structdata.db order by Nutab, Posi;"

     Rs := TOleauto():New('Adodb.recordset')
     Rs:CursorLocation = adUseClient
     Rs:Open( ccSQL , oPConn, adOpenDynamic, adLockReadOnly )