Ado Sample / ejemplo Ado

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
mol
Posts: 3062
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 176 times
Been thanked: 96 times
Contact:

Re: Ado Sample / ejemplo Ado

Post by mol » Tue May 19, 2009 6:43 am

: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?

User avatar
luisvasquezcl
Posts: 1115
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 13 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Tue May 19, 2009 12:14 pm

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.

User avatar
esgici
Posts: 4467
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 345 times
Been thanked: 104 times
Contact:

Post by esgici » Tue May 19, 2009 12:42 pm

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
Viva INTERNATIONAL HMG :D

User avatar
mol
Posts: 3062
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 176 times
Been thanked: 96 times
Contact:

Post by mol » Tue May 19, 2009 1:00 pm

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...

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Been thanked: 1 time
Contact:

Post by Vanguarda » Tue May 19, 2009 9:55 pm

Thanks luisvasquezcl for sharing with us.



with best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
mol
Posts: 3062
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 176 times
Been thanked: 96 times
Contact:

Post by mol » Wed May 20, 2009 5:28 am

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...

User avatar
luisvasquezcl
Posts: 1115
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 13 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Wed May 20, 2009 12:27 pm

Vanguarda Thanks for your words.
Mol, I think it is the driver that is causing problems,
Roberto said that the matter?

User avatar
mol
Posts: 3062
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 176 times
Been thanked: 96 times
Contact:

Post by mol » Thu May 21, 2009 6:15 am

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...

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Been thanked: 1 time
Contact:

Post by Vanguarda » Fri May 22, 2009 11:18 pm

Hi luisvasquezcl,

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


with best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
Ismach
Posts: 76
Joined: Wed Nov 28, 2012 5:55 pm
DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
Location: Buenos Aires - Argentina
Been thanked: 7 times

Post by Ismach » Tue Mar 22, 2016 7:40 pm

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 )

Post Reply