January 18th, 2007, 02:35 PM
[VB 6.0 + ODBC + Fb Embed] Problem with character set...
I'm using WIN1250 character set in my database.
But i can't configure properly my ODBC driver...
(Control Panel -> Administrative Tools -> Data Sources (ODBC) -> System DNS -> Firebird Driver -> Character set)
When I set it to "NONE" I can compile and run my program. But it crashes when I'm trying to add new record to my database - I receive an error during insert statement ( [ODBC Firebird Driver][Firebird] CHARACTER SET WIN1250 is not installed)
And when i set it to "WIN1250" and compile my program it crashes instantly and displays an error:
[ODBC Firebird Driver] bad parameters on attach or create database. CHARACTER SET WIN1250 is not defined.
I think I know where the problem may be... Embedded version of Firebird contains "intl" directory with "fbintl.conf" and "fbintl.dll" files. And these must be in the same directory as my program.
And when i publish my program, vb 6.0 makes a .exe of my program, i copy these 2 files to the same catalog and i run my program from .exe everything works OK. ( no matter what character set i choose in System DNS configuration panel)
Question is - what should I do to work correctly with my database from VB 6.0 ?
January 19th, 2007, 02:25 AM
I seem to remember that it's a known problem and your diagnosys should be right.
Originally Posted by maciak
January 19th, 2007, 10:59 AM
January 20th, 2007, 07:12 AM
I think i know the answer.
To get everything work these three steps must be done:
1) Charset properity in ODBC driver must be set to "NONE",
2) In vb 6.0 you must compile your program by choosing "File" -> "make abc.exe" ( where "abc" is your program's name) instead of Run -> Start (or just pressing F5 key). Doing so makes a .exe file of your program.
3) In the same place, where is your .exe program, you must copy "intl" directory with "fbintl.conf" and "fbintl.dll" files.
Now, when you run your program by clicking twice on .exe file, everything works ok
Hope these helps anybody in the future