Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Saturday, February 25, 2012

Remote connecton

I made a 1 form app(to learn with) in VB Express. I published it, installed it on my pc and everything is fine(I used a db from my main app I'm building which was made in VBE(but I didnt install the db in my project, I only connected to it) anyhow

With my 1 form application, I can add,edit the records in the db, no problem there but

when I took it to another pc and installed it, it installed fine, but when you launch the app I got an exception stating

That it cannot find a SQL connection etc...

I do have remote connections checked in SQL.

Is there something that you have to do to a remote pc to make it visible?

We have a simple peer to peer network.

I have an existing app(Access) that I use mapped drives to share the data, I did open the folder for those mdb's and they were there which eliminates connectivity problems from pc to pc.

What did I do!!

Davids Learning

Fixed my problem!

Davids Learning

|||

Please post the solution you came to so that others can also learn.

|||

Learned from a remote pc that .\SQLServer doesnt work

Try the name of the pc and \SQLServer

Davids Learning

|||

That is corect. When you use the .\SQLExpress the . notion is a short form for the local machine.

BTW Thanks for posting the answer.

Monday, February 20, 2012

remote connection not allowed, but its local

I have a form to submit some data to a database located in the App_Data folder. I have the following connection string:

<

connectionStrings>

<

addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Siven.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>

</

connectionStrings>

On the form I'm using a DetailsView control and using a SqlDataSource as the datasource, pointing to the above connection string. In realtime, when i submit the data, I receive the following error:

Server Error in '/' Application.

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'm using discountasp.net as the host, and I did not elect to use the SQL Server databases, I'm just going to use SQL 2005 express. I dont understand why it's not pointing to the db when it's there (and to make sure, I re-uploaded). Is there something I missed here?

pcdebb:

In realtime, when i submit the data, I receive the following error:

When debug, the application can connect to SQL Server via Shared Memory Protocol (lpc). I guess when in realtime, Shared Memory Protocol may not be used by the website connection. So make sure you've enabled remote connection in SQL Server Surface Area Configuration