Re: Can't Connect to Remote Server Via Visual Basic 2008



Ok, without the ENTIRE connection string we can't really tell much about what you're doing. By default VS (2005 or 2008) uses User Instance connections which are (IMHO) tougher to get working correctly. The ..\SQLEXPRESS data source is correct if you are trying to connect to the SQLEXPRESS named instance of SQL Server on the local (not remote) system. This approach is fine but you say you're referencing a "file"--I assume this is the .mdb database file. I expect that your drag-and-drop connection is using User Instance which makes a copy of the SQLEXPRESS instance in the user area of the hard disk.
The "." as server name eliminates the network layer which should simplify the operation. However, I recommend that you attach the .mdb file to the local SQLEXPRESS instance. This is a one-time operation that dramatically simplifies connecting. Make sure the .mdb file is not part of your project but kept on a local drive (not a networked drive). I discuss this at length in my 7th Edition (Chapter 9).


__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Dewayne Balentine" <DewayneBalentine@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:FE2E52A3-536F-4CFF-82EB-6E59B3EC773C@xxxxxxxxxxxxxxxx
Rick & William -

Thank you for your responses.

Rick:

1. Yes, server is actually an XP Pro Box.
2. Yes, SQL Browser Service is running (not sure where to add port number,
reviewing now)
3. Yes, I am connecting via a named instance as you have it.

VB2008 has setup most of the connection for me. What keeps catching my eye
is that the data source is .\SQLEXPRESS which just doesn't seem right.

William:

Currently re-reading your article. Very gun shy right now so having to read
every little line word by word.

My problem is definatly an issue between the server and the workstation. If
I us VB2008 on the server itself I connect to the file without a problem.

Just to verify:
1. I don't need any sql tools (sql manager) on the workstation.
2. IIS doesn't need to be running for this type of configuration, right?

Thanks for all your help.
Dewayne



.



Relevant Pages

  • Re: Connection issues between .Net framwok and SQl Express 2005
    ... You will no longer need the database MDF file name in the connection string. ... simply attach the ASPNETDB.mdf to SQL Server permenantly, ... as USER INSTANCE on existing SQL Server Express, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Performance of ODBC
    ... if you have a software firewall; forward 1433/1434 to your server ... I've now created my own server with SQL Server 2005 Express, ... glitch concerns the Upsizing Wizard. ... I originally set up my ODBC connection via ...
    (microsoft.public.access.adp.sqlserver)
  • SQL 2005 Express and VS .Net 2003 wizard error More options
    ... Open the server explorer panel ... Go to the Provider tab and select SQL NAtive Client (DON'T use oledb ... Go back to the Connection tab and carry on setting up the connection ... I have installed Visual Studio 2005 Professional and then Visual Studio ...
    (microsoft.public.sqlserver)
  • Re: Timeout problem with SS2K, VS03
    ... I noticed calls in sql profiler: ... This is the server side debug stored procedure. ... a timeout issue that I cannot identify the source of. ... transaction is committed and the connection is closed cleanly and all ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cannot connect to SQL Express on 2003 Machine from XP machine
    ... listening on UDP 1434 using netstat -abn, ... And i double checked the connection string, and i did have it the right ... But I have another 2000 server that I can connect to fine, ... I am trying to connect from an XP SP2 machine remotely to a SQL Express ...
    (microsoft.public.sqlserver.connect)