Strange VB6 Datagrid Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marinho80
    New Member
    • Nov 2006
    • 5

    Strange VB6 Datagrid Problem

    Hoping someone has experienced this before and can offer a solution.

    I have an app. that was designed in vb6. The app works with data from a SQL server, retrieves the data using the adodc (MSADODC.OCX) control and displaying data using the datagrid control.(MSDATG RD.OCX)

    Have had no problems to date with windows xp,successfully installed on more than 30 pc's all running windows xp, with the exception of 3 windows xp client machines where i recently installed it and the datagrid control just doesnt display any text! I know the adodc recordset has information to display based on a recordcount,the grid loads and is registered correctly... no errors but simply has no text in it?

    Any ideas would be greatly appreciated! Many Thanks...
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    A missing font on those machines, perhaps?

    I supose that depends on what you mean when you say "no text". Is there definitely no data in there, or is it just not visible?

    Comment

    • albertw
      Contributor
      • Oct 2006
      • 267

      #3
      Originally posted by Killer42
      A missing font on those machines, perhaps?

      I supose that depends on what you mean when you say "no text". Is there definitely no data in there, or is it just not visible?
      according to me, if a font is missing, the program will take ms sans serif as standard
      seems more like there is no data

      Comment

      • marinho80
        New Member
        • Nov 2006
        • 5

        #4
        Originally posted by Killer42
        A missing font on those machines, perhaps?

        I supose that depends on what you mean when you say "no text". Is there definitely no data in there, or is it just not visible?
        Hi there thanks for replying...

        There is 100% certain data that the grid should be showing... as the datagrid's datasource is an adodc control linking to a SQL table that has info in it.

        And this is confirmed as the app works fine with the identical grid and data request working on all but three Windows XP machines.

        The Datagrid loads but shows no recordselectors and the text that should be in the grid isn't visible.

        Hope this makes sense!

        Initially i thought it might VirusScan which was stealing the text due to buffer overflow protection, i uninstalled the anti-virus software tho and it made no change so im stuck?any ideas? Thanks again

        Comment

        • marinho80
          New Member
          • Nov 2006
          • 5

          #5
          Originally posted by Killer42
          A missing font on those machines, perhaps?

          I supose that depends on what you mean when you say "no text". Is there definitely no data in there, or is it just not visible?
          Here is a sample screenshot...

          [IMG]Pic1[/IMG]

          Comment

          • marinho80
            New Member
            • Nov 2006
            • 5

            #6
            apologies...scr eenshot missing on last post please view attachment
            Attached Files

            Comment

            • albertw
              Contributor
              • Oct 2006
              • 267

              #7
              Originally posted by marinho80
              apologies...scr eenshot missing on last post please view attachment
              hi

              do the headers come from your database table?

              Comment

              • marinho80
                New Member
                • Nov 2006
                • 5

                #8
                Originally posted by albertw
                hi

                do the headers come from your database table?
                hi thanks for replying...
                yes the headers come from the table! its weird the app works everywhere else fine...have tried regitering newer versions of the msdatgrd.ocx and the msadodc.ocx with regsvr32...stil l does the same! ive even bundled the app with a vs.net 2003 msi setup file...re-installed it...same thing...this still doesnt explain why it works on all other pc's! could it have something to do with their windows user account? have also tried giving "Everyone" read and right permissions in the security options for the installation directory with no results.

                Comment

                • albertw
                  Contributor
                  • Oct 2006
                  • 267

                  #9
                  Originally posted by marinho80
                  hi thanks for replying...
                  yes the headers come from the table! its weird the app works everywhere else fine...have tried regitering newer versions of the msdatgrd.ocx and the msadodc.ocx with regsvr32...stil l does the same! ive even bundled the app with a vs.net 2003 msi setup file...re-installed it...same thing...this still doesnt explain why it works on all other pc's! could it have something to do with their windows user account? have also tried giving "Everyone" read and right permissions in the security options for the installation directory with no results.
                  now i'm going to suggest some things which you already did (maybe)

                  password protected database?
                  create a new connectionstrin g
                  (very stupid) your datagrid forecolor? or even fontsize?

                  Comment

                  • Lavs
                    New Member
                    • Mar 2007
                    • 16

                    #10
                    Halu... I'm a new member of this forum. I just read your post about the datagrid that doesn't show data from the database. And definitely, I can't answer that question because I myself is a beginner in Visual Basic Programming. I'm here to ask you something... It's all about creating a backup files to a storage device...
                    Can you please give me a sample code for creating a backup files to any storage device like CD ROMs, Floppy Disk, Flash Drives using Visual Basic 6.0... I am using a database created in MS Access 2003 Version. The Provider I used is the Microsoft JET OLEDB 4.0

                    By the way, about the datagrid... Are you sure that the recordset has retrieved the data you want? Have you tried checking if the recordset is empty or not?

                    Comment

                    • misolution
                      New Member
                      • Jun 2007
                      • 1

                      #11
                      Hello sirs,
                      Myself too is facing the same problem. My application is using the datagrid to show some colums from a table. The problem is that it is working fine when I use the Jet 3.51 in connection string. But When I use Jet 4.0 it is not showing the rows. I have checked the record count of the connected record set. It is showing a count so recordset is not empty. I don't know what is happening. My OS is Windows XP service pack 2. Let me know when you get a remedy to this problem.

                      Thans and Regards

                      Suresh

                      Originally posted by marinho80
                      Hoping someone has experienced this before and can offer a solution.

                      I have an app. that was designed in vb6. The app works with data from a SQL server, retrieves the data using the adodc (MSADODC.OCX) control and displaying data using the datagrid control.(MSDATG RD.OCX)

                      Have had no problems to date with windows xp,successfully installed on more than 30 pc's all running windows xp, with the exception of 3 windows xp client machines where i recently installed it and the datagrid control just doesnt display any text! I know the adodc recordset has information to display based on a recordcount,the grid loads and is registered correctly... no errors but simply has no text in it?

                      Any ideas would be greatly appreciated! Many Thanks...

                      Comment

                      • kingo3434
                        New Member
                        • Aug 2007
                        • 1

                        #12
                        Hi there,
                        I have had the same trouble with datagrid staying empty, but in my case the datacontrol stores no data.
                        Then I replaced the datacontrol with a ado.recordset-object and set the datasource of the grid to that object.
                        After all, data is now visible on the grid.
                        So, if you can, throw the datacontrol out of your application.

                        Regards,
                        Ingo

                        Originally posted by misolution
                        Hello sirs,
                        Myself too is facing the same problem. My application is using the datagrid to show some colums from a table. The problem is that it is working fine when I use the Jet 3.51 in connection string. But When I use Jet 4.0 it is not showing the rows. I have checked the record count of the connected record set. It is showing a count so recordset is not empty. I don't know what is happening. My OS is Windows XP service pack 2. Let me know when you get a remedy to this problem.

                        Thans and Regards

                        Suresh

                        Comment

                        • kvikhrov
                          New Member
                          • Jan 2012
                          • 1

                          #13
                          Hello, guys.
                          I know there has been quite a while since the last answer to this post was given. I just want to leave some comments of mine, trying to help people in similar situations.
                          My case was even more rare. I was working perfectly working with ADODB.Recordset objects instead of datacontrols (like kingo3434 said). Using "Set mydatagrid.data source = myrecordset" syntax. Thus, the records in the datagrid got refreshed just fine. I always used one general (public) ADODB.connectio n object for my app's queries. One day, trying to create a connection object within my grid data binding procedure, all of a sudden the grid stopped displaying data. I made sure I used the same ConnectionStrin g for the local connection object, as the one from from the general connection object. To make things worse, I "rollbacked " every change, so as to use the public ADODB.connectio n again instead. And to my surprise that did not get the things the back. My recordset always had records to display, though.

                          Reading Albertw's advices and misolution's issue on Jet version, I tried to use a different ConnectionStrin g...

                          The string I used to have was: "PROVIDER=Micro soft.Jet.OLEDB. 4.0;User ID=Admin;Data Source=" & DBPath & ";Persist Security Info=False;Jet OLEDB:Database Password=passwo rd;".

                          My problem was solved using the following string: "Provider=MSDat aShape.1;Data Source=" & BDPath & ";Data Provider=Micros oft.Jet.OLEDB.4 .0;Jet OLEDB:Database Password=passwo rd"

                          I'm not really sure how adding MSDataShape clause could have worked things out (I usually use this string when I need to execute SHAPE queries), because Jet 4 is still mentioned as Data Provider further in the string. But I'm happy it helped me out!!

                          Comment

                          • Killer42
                            Recognized Expert Expert
                            • Oct 2006
                            • 8429

                            #14
                            Haha "quite a while" is an understatement; 4½ years since the previous post.

                            But thanks for giving us the benefit of your experiences - it's all good to have in the archives for people to search.

                            Comment

                            • charlesdaniel1
                              New Member
                              • Feb 2014
                              • 1

                              #15
                              It did Work for me

                              Thank you for this posting which really helped me a lot. Very strange yet very practical.


                              Originally posted by kvikhrov
                              Hello, guys.
                              I know there has been quite a while since the last answer to this post was given. I just want to leave some comments of mine, trying to help people in similar situations.
                              My case was even more rare. I was working perfectly working with ADODB.Recordset objects instead of datacontrols (like kingo3434 said). Using "Set mydatagrid.data source = myrecordset" syntax. Thus, the records in the datagrid got refreshed just fine. I always used one general (public) ADODB.connectio n object for my app's queries. One day, trying to create a connection object within my grid data binding procedure, all of a sudden the grid stopped displaying data. I made sure I used the same ConnectionStrin g for the local connection object, as the one from from the general connection object. To make things worse, I "rollbacked " every change, so as to use the public ADODB.connectio n again instead. And to my surprise that did not get the things the back. My recordset always had records to display, though.

                              Reading Albertw's advices and misolution's issue on Jet version, I tried to use a different ConnectionStrin g...

                              The string I used to have was: "PROVIDER=Micro soft.Jet.OLEDB. 4.0;User ID=Admin;Data Source=" & DBPath & ";Persist Security Info=False;Jet OLEDB:Database Password=passwo rd;".

                              My problem was solved using the following string: "Provider=MSDat aShape.1;Data Source=" & BDPath & ";Data Provider=Micros oft.Jet.OLEDB.4 .0;Jet OLEDB:Database Password=passwo rd"

                              I'm not really sure how adding MSDataShape clause could have worked things out (I usually use this string when I need to execute SHAPE queries), because Jet 4 is still mentioned as Data Provider further in the string. But I'm happy it helped me out!!

                              Comment

                              Working...