Thanx in advance.
Chris
ch...@caltechnix.com.mx
Regards
--
Ricardo Lopez Celani
Unisolutions S.A.
rlo...@unisolutions.com.ar
"Chris Ammann" <ch...@caltechnix.com.mx> escribió en el mensaje
news:3f04...@news.softvelocity.com...
Regards Chris
"Ricardo Lopez Celani" <rlo...@unisolutions.com.ar> escribió en el mensaje
Yes it is possible to write a conversion program from a Clarion TPS/DAT
structure to MySQL using the TPS/DAT driver and generic ODBC driver.
Personally I would hand code this type of project.
Example (This is over simplified but should get you started)
MyTPSTable FILE,DRIVER('TOPSPEED'),PRE(TPS)
RECORD RECORD
StringField STRING(10)
DateField LONG
...
END
END
MySQLTable
FILE,DRIVER('ODBC'),PRE(MySQL),NAME('MySQLTable'),OWNER('....')
RECORD RECORD
StringField CSTRING(11),NAME('StringField') !Original
plus one unless you want a CHAR on the backend
DateField STRING(8)
DateField_GRP GROUP,OVER(DateField)
DateField_Date DATE
DateField_Time TIME
...
END
END
CODE
OPEN(MyTPSTable)
OPEN(MySQLTable) !Assumes the table structure exists on the
backend - you can have clarion create it but you miss out on quite a few
'features' of the DB
SET(MyTPSTable)
LOOP
NEXT(MyTPSTable)
IF ERRORCODE() THEN BREAK.
MySQL:Record :=: TPS:Record !I prefer to move
field by field here so I have control over formatting, validation, etc.
ADD(MySQLTable)
IF ERRORCODE()
IF ERROCODE() = 90 !A SQL Driver Error
MESSAGE('An error occurred when trying to add a
new record (' & FILEERRORCODE() & ': ' & FILEERROR())
!break out, ignore, whatever you want here
END
END
END
CLOSE(MyTPSTable)
CLOSE(MySQLTable)
MySQLTable{PROP:Disconnect}
RETURN
Of course you could use ABC to do this, even the progress template. If you
are converting an existing application to MySQL, backup your current DCT,
change the driver to ODBC (and possibly change the field types - the DCT
editor will let you know)...and your off. Check the NG's here for
additional tips, pitfalls etc. of using MySQL with Clarion (IE: DSN-Less
connections, using PROP:SQL instead of Clarion File Loop, Driver Strings
such as /ZEROISNULL=...). And always remember to read the documentation on
the SQL drivers.
Hope this helps you get started!
Ben Kim
C5.5 EE Rev H
C60.0 EE EA4.5
"Chris Ammann" <ch...@caltechnix.com.mx> wrote in message
news:3f04...@news.softvelocity.com...
Regards.
--
Ricardo Lopez Celani
Unisolutions S.A.
rlo...@unisolutions.com.ar
"Chris Ammann" <ch...@caltechnix.com.mx> escribió en el mensaje
news:3f047561$1...@news.softvelocity.com...
Regards,
Ubaidullah Nubar,
C55, CPD2.1+LPM,
ASP,PHP - CodeCharge
PB+PFC
"Chris Ammann" <ch...@caltechnix.com.mx> wrote in message
news:3f04...@news.softvelocity.com...
Thanks.
Kelvin Chua
SINGAPORE
"Ubaidullah Nubar" <ubaidul...@hotmail.com> wrote in message
news:3f05...@news.softvelocity.com...
Why not do it the easy way? File Manager 3 automatically creates the tables
on the MySQL backend, and converts the data from your TPS / DAT files! It's
supports an increasing number of file drivers and backends, and
automatically manages and upgrades your backend file structures for you!
For more info: http://www.capesoft.com/accessories/fm3sp.htm (com may be
down - try co.za!)
... or feel free to email me with any questions!
Hope this helps.
--
--------------------------
Lesley Dean
CapeSoft
www.capesoft.com
"Chris Ammann" <ch...@caltechnix.com.mx> wrote in message
news:3f04...@news.softvelocity.com...
Would the same apply for SQL anywhere , would FM3 work with this as well ???
Many thanks
Simon L Newell
Shackerley Group
What am i dooing wrong?
Regards Chris
C55, C6
"Ubaidullah Nubar" <ubaidul...@hotmail.com> escribió en el mensaje
news:3f05...@news.softvelocity.com...
Roberto Artigas Jr.
Robert <at> midsouth <dot> rr <dot> com
Why waste time learning when ignorance is instantenous?
"Chris Ammann" <ch...@caltechnix.com.mx> wrote in message
news:3f05caba$1...@news.softvelocity.com...
Currently SQL Anywhere is not supported, but Sybase is most likely next on
the list of supported drivers. No time frame at this stage unfortunately,
but there a few things on my list of things to do, and then we'll get stuck
into it! - I know - so helpful! :)
Hope this helps.
--
--------------------------
Lesley Dean
CapeSoft
www.capesoft.com
"Simon Newell" <simon...@shackerley.co.uk> wrote in message
news:3f05...@news.softvelocity.com...
The final step is to use a tool like EMS MySQL Manager 2 that allows me to
upload the files to their respective MySQL tables. Voila!! Your tables are
loaded and you can view them.
If you have questions, I would be glad to help, based upon my knowledge of
the subject. I lost many sleepless nights trying to figure out what was
going on with MySQL and Clarion in the beginning. I still have some issues
but am finding the experience both easier and rewarding.
"Chris Ammann" <ch...@caltechnix.com.mx> wrote in message
news:3f04...@news.softvelocity.com...
http://www.capesoft.co.za/accessories/fm3sp.htm
--
Geoff (at Capesoft)
PS - All viewpoints regarding Capesoft products are as unbiased as
possible - but there are no guarantees <g>.
Tel: +27 21 705 8584
Fax: +27 21 705 8587
www.capesoft.com
"Vince Crosby" <vcr...@dutyfree.com> wrote in message
news:3f28...@news.softvelocity.com...
Rolando D. Velazquez
Active Performance Systems
"Geoff Thomson" <ge...@capesoft.com> wrote in message
Just get FM3...
Rocky
"Geoff Thomson" <ge...@capesoft.com> wrote in message news:3f28...@news.softvelocity.com...