dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] Strange chars in DataGrid on Windows 7

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2007
    Posts
    106

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

    Name:  1.jpg
Views: 189
Size:  8.7 KB

    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!

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,995

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2007
    Posts
    106

    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.

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,995

    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

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2007
    Posts
    106

    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
  •  



Featured


Click Here to Expand Forum to Full Width