CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    90

    Slow SQL Server connection VB6

    In VB6 project I tried 2 connection strings:
    Code:
        objConn.ConnectionString = "DRIVER=SQL Server;SERVER=(local);UID=;DATABASE=SRSNew;Trusted_Connection=Yes"
    and
    Code:
        objConn.ConnectionString = "Driver={SQL Server Native Client 10.0};Server=(local);Database=SRSNew;Trusted_Connection=yes;"
    The first connection opens in 10 seconds on the local server on my development machine, the second one takes just a portion of second.

    When I run the exe directly on the company server both connections are very fast.

    I would not want to to use the second connection because MS SQL data type varchar(MAX) did not exist at the latest VB6 version and the ADODB recordset returns garbage containing non english characters instead of normal string.
    I think that if on the company server both strings run very fast and on the local machine the first one is very slow then there are some differences in SQL Servers settings. What are they? Or I'm wrong suspecting settings?
    My machine is pretty powerful - Xeon 2.8 GHZ processor SSD hard drives, 24 GB Ram.

    Any suggestions please.

    Thank you

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Slow SQL Server connection VB6

    Please, don't post the same question to more than one CG forum!
    Victor Nijegorodov

  3. #3
    Join Date
    Jan 2013
    Posts
    90

    Re: Slow SQL Server connection VB6

    Quote Originally Posted by VictorN View Post
    Please, don't post the same question to more than one CG forum!
    Sorry. I just would not want to get the answer on this forum something like this "Go to VB6 forum because it is not related to SQL Server" and opposite suggestion there on VB6.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Slow SQL Server connection VB6

    Didn't you read the Announsments before you have posted?
    Please, do it: http://forums.codeguru.com/announcement.php?f=51
    Victor Nijegorodov

  5. #5
    Join Date
    Jan 2013
    Posts
    90

    Re: Slow SQL Server connection VB6

    Quote Originally Posted by VictorN View Post
    Didn't you read the Announsments before you have posted?
    Please, do it: http://forums.codeguru.com/announcement.php?f=51
    Sorry again

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured