I am connecting a data grid to a vb6 form using the following code (the connection is fine-it connects to a sql server db).
Set rs = New ADODB.Recordset
rs.Open TableName, conn, adOpenKeyset, adLockOptimistic
Set dgPartData.DataSource = rs
dgPartData.Caption = "Event Registration for " & sEventName
The table name is syntactically correct. What happens is if the first record in the database table is selected all is fine. However, if the user scrolls beyond the first record then my form gets all weird with phantom objects appearing through the text boxes, etc..
I have traced the issue to the 'Set dgPartData.DataSource = rs' line. Is there something I should do when connecting a grid to a db in code that I am not doing?
Thanks!What data types used in that table?
How about collation settings on SQL Server and on Windows on App./Web server?|||THe data types are mostly varchar, int and bigint. I am not sure what you mean by collation settings.
I have discovered that it seems to be connected to a bug in the refresh method of the adodc data object that is fired when using the adCmdTable setting and then trying to call the refresh method of the data object.
I have appeared to have worked around it but it is a little awkward. Let me know what you are thinking with the settings questions, please.
Thanks!!|||IF its something to do from VB side then I don't interfere and comment.
As far as SQL server is concerned if you do not find any information from SQL Error log then simply follow the workaround you have adopted.
In general COLLATION setup is used to specify code page and sort order for character data. Where it does deal with Windows collation & SQL Collations, more about this topic can be found from BOOKS ONLINE.
BTW< what is the service pack level on SQL Server & OS?|||I am not sure. How do I find that out? I am using SQL Server 2000 and Windows XP. I am getting the latest updates on the OS automatically. Where do I find the latest SQL Server SPs?
Thanks a ton! I'll look into collation!|||From SQL Server query analyzer run SELECT @.@.VERSION and let me know the result.
You can get information on SPs from MS SQL (http://www.microsoft.com/sql) website and download'em.|||Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 1)|||should download XP ServicePack 1 and SQL Server Service Pack 3a|||No its SQL 2000 with NO SP!
Refer to the above link and download SP3 and apply, its recommended to fix issues and get rid of hackers.|||aha... do read to SP3a readme file or fixlist before applying SP3a, otherwise SP3 is enough to apply.
No comments:
Post a Comment