Remote Connection To Database On Same PC?

Dec 29, 2006

I am running the SQL express advanced on the same PC that also hosts my Visual Basic Express application. I have user instances turned off and full-text enabled and working from within a SQL query window. However, I can not create a working connection to the database using the data source wizard from the server explorer within VB.NET. Since this is on the same PC, do I need to enable anything other than shared memory? I get the error: Provider SQL Network Interfaces, error 26 Error locating server/instance.

DeBug

View 12 Replies


ADVERTISEMENT

Remote Database Connection

Mar 4, 2006

Hello,
 
My database stays in a remote site and I have access it through VPN. I would like connect my current Windows based Asp.Net application with this database. What are my options? Can I connect remote database with SqlDataAdaper, will that be slow? Should I sue Web Services to connect database?

View 1 Replies View Related

Connection To Database On A Remote Server

Nov 29, 2007

Here is my environment and problem:
 I have VWD 2005 and SSE 2005 installed on my local machine. I also have these installed on my Windows 2003 Server. I developed my database using SSE on my local machine but pointing to directory on my server. I have been developing the web app using VWD on my server. I now want to use VWD on my local machine and point to the project on my server. I am able to open the project. In order to access the database in the "Database Explorer" I use as my "Data Source", "MS SQL Server (SQL Client) and it attaches fine and I can see my tables and data.
 Now for my problem:
When I try to run the application "VIew in Browser", which login.aspx page is my first page, I get the page, but it doesn't inherit my master page which has the basic navigation and layout. Then after I try to login I get this message.
The file "W:BBAppApp_DataTimeTracker.mdf" is on a network path that is not supported for database files.An attempt to attach an auto-named database for file W:BBAppApp_DataTimeTracker.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Here is a portion of my web.config file for the connection string.<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=.SQLExpress;Integrated Security=true;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true" />
My website I started with the source code for the TimeTracker start kit and have added more pages and changed the sitemap.
In general I guess I need to know how to handle using VWD on my local machine, but accessing the project on the server. The reason I'm doing this is because my colleague needs to be able to access the web app too to add pages to the site.
 Thank you for any help.

View 1 Replies View Related

Remote Database Connection --SQL Server

Apr 4, 2008

 HI   I have installed VS 2005 with that SQL express edition came default and i then installde SQL server Enterprise Edition .....There i created database and tables and other my colleagues are not able to connect to the Database from there System...........I am using This on XP.......Is it possible to access databse from other remote systems .....IF yes What is the procedure to connect from my other computer to my database which is on XP not any Server OS..  

View 7 Replies View Related

Remote Database Connection Through Firewall

Jan 29, 2001

I'm trying to adminster a remote MS SQL server from inside my company's firewall. I have the correct permissions to pass traffic through the firewall, but I need to authenticate to it first. When I try to register this remote SQL server through Enterpise Manager, it of course does not let me because of the firewall. Is there any way I can pass the firewall ID and password during the server registration process, and then pass the SQL server ID and password? I'm no SQL server expert by any means, but it doesn't look like it's possible. Are there any third party utilities that may accomplish this?

Thanks for the help!

Aaron

View 2 Replies View Related

Database Connection SQL Express 2005 Remote

Jan 2, 2008

Good day.

I am trying to look at a friends database that they have developed. Not having used SQL Server Express before I am experiencing problems trying to remotely connect to their database.

He connects locally just fine of course.

I get the error message about remote connectionsand the default settings so I have enabled TCP/IP and Named Pipes as well as cleared SQLSERVER Express in my firewall settings. I also stopped and restarted the service, but still get the same error message.

My connection parameters are like:

Server type: Database Engine
Server name: http://sql.exampledatabase.net (should http be here? have tried with and without same error)
Authentication: SQL Server Authentication (windows authentication? If so, how do I change to such?)
Login: http://username (should http be here? have tried with and without same error)
Password: password

TITLE: Connect to Server
------------------------------
Cannot connect to http://sql.exampledatabase.net

ADDITIONAL INFORMATION:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

Any help would be much appreciated.
BurntBack

View 5 Replies View Related

Remote(over A Network) Database Connection Issue

Sep 27, 2007

This has to be an easy question.

WORK2 - My workstation (xp pro)
WORK3 - Location of SQL Express 2005

WORK3COMPANY
sa,password

WORK3 is a XPPro, both WORK2 and 3 have full admin rights to their machines and the network, I am using SQL Authentication (sa, password)
I have used the SQL Server Config app to enable the 4 Protocols, then restarted service. I can connect locally to my database via "SQL Server Management Studio Express", and through my VB application. I have checked "allow remote connections" in the database properties.
I do not know what i am missing? any thoughts?

Thanks in Advance

View 12 Replies View Related

Connection String For Remote Database Connectivity(SQL Server2000)

Jun 12, 2007

hai,
I am working on ASP.NET 2003 with SQLServer2000. My application requires to be connected to the Database which is there in my Headoffice.
My SQLServerName is "MyDBServerTestDB"
Database Name is "WebTO", UserID="******" and Password="******"
My Remote Server IP Address is "192.168.1.2" and its Static IP is "58.93.61.235"
I have specified the Connection string for my Remote Server as
"Provider=SQLOLEDB.1;Server=58.93.61.235TestDB;UID=******;PWD=******;Database=WebTO"
                               (or)
"Provider=SQLOLEDB.1;Server=58.93.61.235TestDB,1433;UID=******;PWD=******;Database=WebTO"           (1433 is the Port number of the Remote SQLServer)
but it is giving the error " SQL Server does not exist or access denied".
if i execute the same application at my Headoffice (Remote Server) by changing the Connection string as
"Provider=SQLOLEDB.1;Server=192.168.1.2TestDB;UID=******;PWD=******;Database=WebTO"
then, it is working fine.
Can anyone tell me where i went wrong or what i have to specify in my Connection string so that i can access my Remote Database Server.
Thanks in Advance,
Srinivas.

View 7 Replies View Related

Login Failed For User - Remote Database Connection

Mar 26, 2008

Hi,
I have an ASP.Net web application running in groupnamewebservername. I am trying to connect it to the remote database server groupnamedatabaseservername using the ASPNET user id. The remote database is SQL Server 2005 and the web server has IIS 6.0 installed. My web.config connection entry has username as "groupnamewebservernameaspnet" and I have a database user in remote database server under the login name groupnamewebservername$. When I try to connect, I keep getting the following error:
  System.Data.SqlClient.SqlException: Login failed for user 'groupnamewebservernameaspnet'.
 
Could you please let me know what I am doing wrong here? Thanks.
Regards,
Gayathri.
 

View 10 Replies View Related

Need To Establish A Remote Connection To An Sql Database On A Local Server (same Domain)

Feb 16, 2007

Hi, I have been creating a web store, which we will be hosting on our Windows Server 2003 system.  I am also writing a windows application that will be running on our client systems on the same network/domain.  I have no need to allow internet access to the database, just within our domain.  Pretty much the windows application will be running and whenever a customer places an order, the program will automatically pop-up the needed information for our credit card processing, and shipping department.  So far I have been able to establish a connection to our server by creating a data connection under the server explorer.  However, it does not list any databases whatsoever, the web site has been published using Visual Studio 2005 Professional on the server, and is in 100% working order.  I have searched and haven't found anything concrete on this, i'm sure its just something simple that im missing.  It appears that the server is definetely connected to the database (since the website is fully functional), but it is not listing the information for other systems to access it.  If anyone has any ideas, please let me know.  Thank you

View 8 Replies View Related

A Couple Of Questions On Remote Connection To SQL Server 2005 Database

Nov 23, 2006

I have a SQL Server 2005 database (called BDHSE) in a PC which i call PC1. I have a second PC (PC2) and both are within a network (a WLAN).

What i want is to have access to BDHSE from an application in VB6 (APP1) running in PC2. All the INSERT, DELETE, UPDATE records process is done through APP1.

APP1 ia currently running in PC1 and is to be installed on PC2.

I have these questions:

1. What do i need to install in PC2 since all the INSERT, DELETE, and UPDATE is done using APP1? I guess i only have to install the Microsoft SQL Native Client (with all the prerequisites of course) but i am not sure.

2. In the APP1 made in VB6, do i have to change the connectionstring since i am accesing the database which physically is at PC1 and the APP1 will be used in PC2?

3. Any advice you can give me on doing this will be well received.

Thanks in advance,

BSc Fernando Martinez

View 4 Replies View Related

SQL Remote Connection Not Being Seen, Though Remote Connections Allowed

Oct 11, 2007

HiI'm going insane.I have a club starter kit on my local server which is working fine.I have migrated the database to my remote host and seems to have transfered ok.For a brief period I was able to connect to the database remotely, but now I cannot I get the following, even though SQL Server Surface Area Config is set to accept remote connections.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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)This is my connection string;<add name="ClubSiteDB" connectionString="Data Source=xx.xxx.xx.xx,xxxx; Network Library=DBMSSOCN; Initial Catalog=tets; User ID=sqladminbob;Password=sqlbob4398;" providerName="System.Data.SqlClient="/>I hav also tried to use  aspnet_regsql.exe to add the remote provider but I get the same message. Thanks 

View 3 Replies View Related

SSIS Project Failing To Run Even Though I Verified Remote Sybase Connection Via Connection Manager

Apr 7, 2008



When running the project in debug mode or non-debug mode, I get the following error from MS Visual Studio:

TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at Package [Connection manager "SYBASE_CONNECTION"]: The connection manager failed to defect from the transaction.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------

Any ideas???

View 8 Replies View Related

Remote Connection Refused When Creating ODBC Connection To SQL Server 2005

Aug 30, 2006

When I create a new odbc connection to a SQL server 2005 Db I get a failure telling me dat de SQL server does not allow remote connections.

How can I allow the server to allow this.



Any help appreciated



regards

View 1 Replies View Related

SSIS Remote Connection Failing ... Local Connection OK

Mar 1, 2006

I'm getting "Access denied" error when I try to connect to SSIS from my desktop (Database Engine is fine). I'm a member of sysadmin within SQL, as well as an administrator on the server. I don't have any problem when I log on to the server directly via Remote Desktop and open SSIS.

I went into the surface area config tool, and I see that Database Engine and Analysis Services both expand and have a sub tabs to enable Services and Remote Connections, but Integration Services does not expand to a Remote Connections option, just Services. We're running MSDN Enterprise edition.

Does it matter if all the SQL services are using "Local System" for the logon ? I use an administrative logon on my SQL2000 boxes, and was fiddling with them on the 2005 box yesterday, but it seemed to cause more problems, so they are all Local System for now.

Am I missing something obvious ?

View 3 Replies View Related

Bcp Cannot Connect Via Local Connection, But Can Using Remote Connection?

May 19, 2008

Hi. I'm (very) new to SQL Server. I have run into what seems to be a very common problem, judging by the number of Google hits, but it's not actually in the FAQs here, as far as I can see.

Situation
I installed SQL Server Express with Advanced Services 2005 on my Windows XP Pro laptop, using (with one exception) the default install. The exception was to put the data files on a separate partition (D: ) where I have more free space.

SQL Server Management Studio Express connects happily, and I set up a single data import table.

Issue: bcp Fails to connect to default local instance
I initially tried bcp in output mode, prior to working in earnest on importing my data. However the command line-


bcp MyDatabaseName.dbo.UserProfile out UserProfile.txt -T -c

Fails with the error-


Error = [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].

As I understand it, the local instance of SSE is the default, and should use a local (shared memory?) connection. This seems to work for Management Studion Express, but not bcp.


While investigating this problem, I tried enabling remote connections (all types) through the Surface Area Configuration wizard, and found that remote connections using either of:


bcp eSpacePh1.dbo.UserProfile out UserProfile.txt -T -c -S localhostsqlexpress
bcp eSpacePh1.dbo.UserProfile out UserProfile.txt -T -c -S mycomputernamesqlexpress

both work ok.

Extra Info
When starting Management Studio Express, it says something like "Configuring environment for the first time". However it says this every time it is started, not just the first run after installation, does this indicate some configuration data is not being successfully stored?

I have found threads that look similar to my issue-


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=836670&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3351349&SiteID=1

However these do not relate directly to bcp, and to be honest my knowledge of SSE is slender enough at this stage that i'm unsure if there are really relevant.

Any hints on how to proceed much appreciated.

Regards: Colin E.

View 6 Replies View Related

Visual Studio 2005 The Remote Connection To The Device Has Been Lost. Please Verify The Device Connection And Restart Debugging.

Jun 19, 2006

Basically I've been using Visual Studio 2005 for a few weeks now moving a Pocket PC project from 2003 to 2005. When I hit the Start Debugging Button every time until today the project would rebuild and deploy to my pocket PC allowing me to debug etc but now I get

The remote connection to the device has been lost.

Please verify the device conection and restart debugging.

I used to get this problem in VS2003 sometimes and just like the numerous posts on different sites that I've looked at the problem eventually goes away and I'm none the wiser. One guy said that he found that if he went to bed the problem was resolved when he came back!

My PDA running Windows 2003 2nd Edition is directly connected to my PC via a USB port. I've rebooted my PC and done a soft reset on the PDA but it didn't help. I'm using ActiveSync 4.1.

Does anyone know how to resolve this problem?

View 54 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

Remote SQL Connection

Apr 24, 2007

Hello everyone, I am trying to connect to a remote SQL 2005 database from Microsoft SQL Server Management Studio.I enabled the remote connection on the server and creating a user on the server.I am trying to connect to the server from my workstation using sql server authentication with the login name already created on the server.
I am receiving this error: cannot connect to "server name"cannot open user default database. Login failed.Login failed for user "username".(Microsoft SQL Server, Error: 4064)
Can anyone help?

View 1 Replies View Related

To Remote Connection

Mar 31, 2008

hello !
I am deploying a websete in visual studio2005 after deploying, when run a website Login Failed: The user is not associated with a trusted sqlserver connection. error occurs plese anybody helpme. urgent
Thanks.

View 3 Replies View Related

Help With Remote Connection

Apr 23, 2006

I am attempting to connect to SQL 2005 server.  The server and the VS 2005 are on the same computer.  I have configured the db so it uses the security for asp.  The log in section connects fine and checks for the user. I have combined the old db with the new ASP security. If the user is not found then I open a connection  using the open command and check for the user in the old part of the db.  The is where I have trouble.  I get the message below that the server connect but then won't allow remote connections.  I have check the setting and the allow remote connections is checked.  Thank in advance if anyone can help.
 
Endeavor
 
A connection was successfully established with the server, but then an error occurred during the pre-login handshake.  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: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)

View 2 Replies View Related

Remote Connection To MS SQL...

Oct 4, 2004

I am now trying to connect with the correct details to an MS SQL machine.

The machine in question is not local to me and the internal ID is //bobsmachine01.

I know this is a dumb question, but I shall ask it anyway...I am using MS Access 2000's "Upsizing wizard" and it asks me for the machines name - what should I put to connect to it??

I know the IP of the machine and the internal ID for the MS SQL Server.

Any help much appreciated,
Chas

View 1 Replies View Related

Remote Connection

May 8, 2006

How would I connect to remote SQL 2005 database using Management Studio?
The only difference from local DB is that I type IP address instead of server name, right?

I'm getting error:
Testing the registered server failed. Verify the server name, login cridentials, and then click Test again.
Additional information:
An error has occured 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 53)

I did everything from article "How to configure SQL Server 2005 to allow remote connections"(http://support.microsoft.com/?kbid=914277&SD=tech). SQL Browser enabled. Both TCP/IP and Named Pipes are enabled. Exceptions in firewall for sqlsrvr.exe and sqlbrowser.exe added.
Did not help.

What else could I check?

View 3 Replies View Related

Remote Connection

Jun 7, 2007

Hi,
I have SQL Server 2005 running on a machine with "Allow Remote Connections" property turned on. This server has SQL Server Authetication mode turned on.
I can connect to the server locally with sa login and password but when I try connecting to the server remotely it gives me following error:
TITLE: Connect to Server
------------------------------

Cannot connect to ServerName.

------------------------------
ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. 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: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233).

Any help is appreciated.

View 4 Replies View Related

Remote Connection

Jul 5, 2007

Hi all,
I have a machine that is running windows 2003 server, and sql server 2005 developer edition(let's call this machine server one). I have another machine running windows xp and sql server developer edition, visual studio 2005 pro(machine 2). I have developed a small windows application on machine 2, but I'm trying to connection to the database that one mcahine one, and I keep getting some the following error
"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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)"
Any idea why? How do I need to configure that ?thanks

View 5 Replies View Related

Remote Connection

Apr 14, 2008

Hello,

I have microsoft sql server management studio express 2005
but if i want to connect it says that i cant connect because remote connection are not aload but i searched support on microsoft and i enabled it restarted the database enige but still dont works can please someone help me?

Pleasant greats.

Irakli


AND HOW DO I KNOW WHAT MY SERVER NAME IS?

MAYBE ITS BECAUSE MY SQL BROWSER ISINT RUNNING? AND I CAN'T START IT...

View 18 Replies View Related

Allow Remote Connection (using TCP/IP) From SQL Ce

Mar 9, 2007

Hi all,

Need to know if its possible to allow remote connections and access a Sql Ce database using TCP/IP.

Thanks for your help

Hach

View 3 Replies View Related

Remote Connection

Apr 12, 2006

Could someone tell me how to remote connect to other server. Everytime when I try to connect to other server, I get an error message. Eventhough I have opened the 1433 port, allow the remote connection using both TCP/IP and named pipes, and open the firewall for connection. The following is the error message

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

Thank you

View 4 Replies View Related

Remote Connection

Feb 10, 2007

hi guys,

i'm trying to access my friend's database from my computer but i cant seem to detect his database though i can detect his server.

what i did was i tried adding a connection to his database.i typed in the server name but his database name couldnt be detected.

the server name was: WPLSQLEXPRESS

am i missing something here?

this was the error generated when i tried testing the connection:

An error has occurred while establishing a connection to the server.When connection to SQL Server 2005,this failure might be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces,error: 28 - Server doesn't support requested protocol)

what does it mean?how do i solve this problem?

thanx

View 13 Replies View Related

Remote Connection Error

Jun 24, 2006

System.Data.SqlClient.SqlException: 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 enabled the remote connection in the surface area configuration, and i've also enabled my sql browser.
This error raised when i'm testing my just installed WSRFdotnet using
NUnit testing, however, when I tested my remote connection using SQL
Server Management Studio Express CTP, it worked. btw, I'm using SQL
Express

any solutions?
thx

View 3 Replies View Related

Remote Connection Error

Sep 18, 2006

hi communitythe error something like this " error 40, could not open connection to sql server" . For community information i try to transfer my membership table from sql express 2005 to sql server 2000. my application something like email where user need to create their account first before they can log in. I use membership default in mssql express . and my datacenter do not support sql express ( like all we know most of them). I already surf some tips from the internet how we can transfer our membership from sql exppress to sql server but i get this error . i already try to change the setting from sql server surface area configuration but it still not working.. i hope someone ( the jedi ) can help me .. ThankMay The Force Be With U

View 1 Replies View Related

Remote Connection Issue

Mar 4, 2007

I have researched over and over on how to solve the error code below.  I have tried every suggestion under the moon and still get the same error.  Please provide some insight.  Here is exactly what I have done regarding the remote connection issue:
Error:  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)
 History:
1.  Created a test site on my local machine (using MS Visual Web Developer 2005 Express Edition) call WebSite8 for test purposes.
2.  Simply created a single page to allow users to create an account by dragging and dropping the CreateUserWizard onto the designer screen. 
3.  Performed some basic formatting (font, theme, etc) on the web control.
4.  Ensure that TCP/IP and allow remote connection defaults were changed to allow remote connections.
5.  Verfied that the login control worked on my local machine.  Everything worked fine.  I was able to create two new users and was sent to the "complete" portion of the control.
6.  Opened the aspnet_memberships and aspnet_users databases to ensure that the two test accounts were created.....everything good so far.
7.  Copied all files from WebSite8 (1. App_Data Folder - includes ASPNETDB.MDF file created by Developer when I dragged and dropped the CreateUserWizard onto the designed sreen, 2. the main asp web page I called createaccount.aspx, and 3. web,config file) via ftp to my test web site hosted by 1and1.  My test web site is named something different that WebSite8. 
8.  I created a test.htm page on the 1and1 web site to link to the createaccount.aspx page which is in the same path as the test.htm.
9. The process let me enter the user name, password, etc but when I hit submit, I get the error listed below.
10.  Followed some other research suggestions and verified that ApplicationName in the aspnet_Membership was set to "/".  It is.
11.  I checked the web.config file and it does not seem that any connection strings were created when I dragged the CreateUserWizard onto the screen.  Not sure if this is an error on this control or not or if it is ok as is(?)
I believe there is some sort of issue on the hosted web site where the sql server is not linking to the database on the hosted site and is likely trying to link back to my "local" server......just a feeling.
I have tried everything that I can think of after performing relentless research on this error.  I am new to database programming, ASPNET 2.0, SQL, etc but I catch onto things very quickly. 

View 2 Replies View Related

DSN Connection To Remote SQL Server

Jun 3, 2007

Hi,
I've worked with SQL Server plenty but never in this specific manner.  Hoping someone can shed some light.I have a webform on web server A that needs to talk to a SQL server database that web server B accesses via its web application. I do not haveany privelidged access to server B or the sql server it uses (no FTP to webserver, no remote access via Enterprise Manager to the SQL server).  The Admin of Server B told me that I can use a DSN connection to talk to the SQL server database that the web app on server B uses.  He emailed me the names of the SQL database tables AND a copy of the web.config from server B which shows the DSN implemented like this:<appSettings>    <add key="dsn" value="data source=sql3.domainname.net;database=dbname;User Id=dbuserid;password=dbpw;" />    <add key="default_language" value="en" />    <add key="error_email_to" value="someone@domainname.com" />    <add key="baseHref" value="http://www.mysite.com/" />    <add key="website_name" value="$$$$$$$$$$$$$$$$$" /></appSettings>
I was planning to run my webforms on Server A where I do have FTP, Control Panel, etc.So, I wrote this code into my VB.NET codebehind file.
Dim oODBCConnection As OdbcConnectionDim sConnString As String = _"Driver={SQL Server};" & _"Server=sql3.domainname.net;" & _"Database=dbname;" & _"Uid=dbuserid;" & _"Pwd=dbpw"oODBCConnection = New Odbc.OdbcConnection(sConnString)oODBCConnection.Open()... commands to access data and load something into a control on a webformoODBCConnection.Close()
When I attempt to run the webform in my browser from Server A. I'm getting this error:ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).The error is EXACTLY the same whether I place the appSettings section in server A's web.config or leave them out.I have obvious questions about the error like...Might sql3.domainname.net simply be refusing communication requests that don't come from the Server B domain?Might the sql3.domainname.net be setup so that I need to use another protocol (not tcp/ip)?Might my code need to be changed to support this type of connection (i.e. I didn't code it right)?I spent some time reading http://support.microsoft.com/kb/328306/en-us but I'm at a loss as to what the best course is to take for debugging this.Thanks in advance for any insight you can offer.
Stewart

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved