Results 1 to 10 of 10

Thread: ADO/VB6 Glitch

  1. #1
    Join Date
    Apr 2003
    Posts
    114

    Unanswered: ADO/VB6 Glitch

    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!

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    What data types used in that table?
    How about collation settings on SQL Server and on Windows on App./Web server?
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Apr 2003
    Posts
    114
    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!!

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    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?
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Apr 2003
    Posts
    114

    Service Packs

    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!

  6. #6
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    From SQL Server query analyzer run SELECT @@VERSION and let me know the result.

    You can get information on SPs from MS SQL website and download'em.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  7. #7
    Join Date
    Apr 2003
    Posts
    114

    SP1 I guess

    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)

  8. #8
    Join Date
    Apr 2003
    Posts
    114

    Looks like I

    should download XP ServicePack 1 and SQL Server Service Pack 3a

  9. #9
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    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.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  10. #10
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    aha... do read to SP3a readme file or fixlist before applying SP3a, otherwise SP3 is enough to apply.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •