-
Nov 6th, 2013, 06:51 AM
#1
Thread Starter
Lively Member
[RESOLVED] Strange chars in DataGrid on Windows 7
Hello, in my Vb6 application i retrieve data from MySQL.
Recently i installed the application on Windows 7 machine and i get strange chars in datagrid from database. It only occurs on columns where i use CONCAT and SUBSTRING functions.
Connection is made with :
Code:
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=database;UID=user;PWD=pass; OPTION=3"
On windows xp it's running ok.
Thank you!
-
Nov 6th, 2013, 11:35 AM
#2
Re: Strange chars in DataGrid on Windows 7
Font?
Perhaps the app is trying to use a font that does not exist on the Win7 box in which case Windows will pick a font for you that may or may not give the desired results.
I used to distribute a program that used the MS Line Draw font and when installed on a machine that did not already have the font it would initially display using Wing Dings which of course did not display the expected results.
I added code to the installer to register the correct font and force a reboot to get rid of the issue.
-
Nov 7th, 2013, 02:32 AM
#3
Thread Starter
Lively Member
Re: Strange chars in DataGrid on Windows 7
I thought of font problems but i'm having columns that display correctly. It only happens with columns that have CONCAT and SUBSTRING functions of MySQL.
-
Nov 7th, 2013, 10:04 AM
#4
Re: Strange chars in DataGrid on Windows 7
Have you checked which font is in use in the program and if it exists on the windows 7 pc?
It definitely looks like a font issue especially considering that you say it is working correctly on an XP box
-
Nov 15th, 2013, 03:44 AM
#5
Thread Starter
Lively Member
Re: Strange chars in DataGrid on Windows 7
I changed the font in my datagrid and stiil the same error showed.
Instead i changed a bit my query to the database, i used DATE_FORMAT and CAST as char and now the columns show correctly with no error.
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|