Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 15th, 2006, 07:29 AM
Authorized User
 
Join Date: Dec 2005
Location: London, , United Kingdom.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB 2005 connect to server 2003 with SQL database

Hi there,

I wanted to ask whether it is a limitation of VB 2005 or am i doing something wrong? I basically am trying to from connect from a PC (PC1) to a .MDF database on a server (running MS Server 2003 Standard Ed). I have created an ODBC Data Source (on the PC1) and MS Access is able to connect to this database and access the tables with no problems. But when I try to code this or use the 'Add new data source' wizard in VB 2005 I get an error message:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


I have also tried to connect to this by install VB 2005 on the Server, but get the same message so I am guessing it is a limitation of the software or the database is not configured properly. But if that is the case then why can Access access it from across the network?

I understand in sql 2005 the database magement is more flexible with a manager, how can I configure previous versions of SQL server that dont have configuration manager?

Thanks very much for you time and help

Best regards,

Derek


Reply With Quote
  #2 (permalink)  
Old September 15th, 2006, 09:38 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Guessing here, but I would guess that you are encountering a security issue, not a software limitation.
Reply With Quote
  #3 (permalink)  
Old September 19th, 2006, 05:22 AM
Authorized User
 
Join Date: Dec 2005
Location: London, , United Kingdom.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian,

Thanks for your reply, i have gone into the enterprise manager and granted access to my username on the domain. however i still cannot access it. I hav also shared the MS SQL Server folder and granted my username with full permissions, this has allowed me to see the MDF before I couldnt go into the folder where it was in. I just cant open it now through VB express. The ODBC connection is fine though.
Can VB Express connect to databases (.MDF) running SQL Enterprise Manager ver 8?

thank you for you time and help.

Derek



Reply With Quote
  #4 (permalink)  
Old September 20th, 2006, 10:10 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am very new at this but... from what I have seen VB 2005 Express can only connect with the SQL Native client to the localhost. I was also unable to connect to a server running SQL 2005 with VB 2005 Express. I was only able to connect to SQL 2005 Express or my locally installed SQL 2005 Developer's Edition.

If anyone knows another way please let us know...

Thanks!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to connect sql server 2005 priyan.viji Internet Information Services 1 December 16th, 2008 11:57 AM
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
SQL Server 2005/ VS 2003 Issues johnalp VS.NET 2002/2003 1 August 3rd, 2006 02:44 AM
SQL Server 2005/ VS 2003 Issues johnalp ADO.NET 0 July 10th, 2006 12:46 PM
Access 2003 project and SQL server 2005 jesseleon Access VBA 3 February 23rd, 2006 12:03 PM



All times are GMT -4. The time now is 03:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.