2 Replies - 5866 Views - Last Post: 22 April 2010 - 06:36 AM Rate Topic: -----

#1 Devil505  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 07

VB connection to SQL Server 2005 via udl

Posted 21 April 2010 - 11:51 AM

I have a VB6 EXE located on a network drive. It makes a connection to a SQL Server 2005 database using a .UDL file located in a folder in this app.path.

Can anyone explain why it takes 10-20 seconds for that code to make the SQL connection when run from it's network location while it only takes less than 1 second to connect when the same code (and .UDL) is located on the local machine HD?

Thank-you in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: VB connection to SQL Server 2005 via udl

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: VB connection to SQL Server 2005 via udl

Posted 21 April 2010 - 07:17 PM

You mean that the UDL file is on a shared drive and you are opening it over the network which could be busy with people streaming the daily news, surfing to their favorite sites, and possibly clogged with the multiple various chat program and email and you want to know why it takes so long to open? Let alone the traffic you add to the network when you do make the connection and or do a query that pulls information across a potentially already clogged network...



Good Luck
Was This Post Helpful? 0
  • +
  • -

#3 Devil505  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 07

Re: VB connection to SQL Server 2005 via udl

Posted 22 April 2010 - 06:36 AM

Actually the code and the UDL are both on a network drive. Funny thing is that the program can hit the SQL server using the same network multiple times in the program and theoretically bring back more data in < 1/10th the time it takes to simply make the connection to the SQL server. When running the program from the network, it opens and is running in much less than a second but when the user chooses his/her location, it makes the connection to the closest SQL server and that is where it takes all the additional time.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1