By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

Strange VB6 Datagrid Problem

P: 5
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.(MSDATGRD.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...
Nov 21 '06 #1
Share this Question
Share on Google+
14 Replies


Expert 5K+
P: 8,434
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?
Nov 22 '06 #2

100+
P: 267
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
Nov 22 '06 #3

P: 5
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
Nov 22 '06 #4

P: 5
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]
Nov 22 '06 #5

P: 5
apologies...screenshot missing on last post please view attachment
Attached Images
File Type: jpg screenshot.jpg (18.9 KB, 1394 views)
Nov 22 '06 #6

100+
P: 267
apologies...screenshot missing on last post please view attachment
hi

do the headers come from your database table?
Nov 22 '06 #7

P: 5
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...still 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.
Nov 22 '06 #8

100+
P: 267
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...still 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 connectionstring
(very stupid) your datagrid forecolor? or even fontsize?
Nov 23 '06 #9

P: 16
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?
Mar 6 '07 #10

P: 1
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

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.(MSDATGRD.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...
Jun 26 '07 #11

P: 1
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

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
Aug 23 '07 #12

P: 1
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.datasource = myrecordset" syntax. Thus, the records in the datagrid got refreshed just fine. I always used one general (public) ADODB.connection 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 ConnectionString 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.connection 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 ConnectionString...

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

My problem was solved using the following string: "Provider=MSDataShape.1;Data Source=" & BDPath & ";Data Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=password"

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!!
Jan 3 '12 #13

Expert 5K+
P: 8,434
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.
Jan 4 '12 #14

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


@kvikhrov
Feb 24 '14 #15

Post your reply

Sign in to post your reply or Sign up for a free account.