Using MS SQL Express on .NET 2 - problems !
I've got a database file connected to my server using the walkthrough at,
http://msdn2.microsoft.com/en-us/library/ms165673.aspx
I've got my Visual Basic application connecting to this server and database using the connection string,
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Database=imei2;Data Source=mycomputer\sqlexpress"
Where IMEI2 is the name of the database, and MYCOMPUTER is the name of my computer.
--------
The strange thing is, if I build my application and run it from my local harddrive it works fine. I can also copy the files to my other harddrive and it runs fine there also ..
BUT, if I copy it to a network drive it crashes when loading the database.
Also, if I try to run this from other computers (where .NET sp1 is installed) it also crashes !!
Why this ??
How can this happen ??
I can't find any logical solution to this probelm ??
Re: Using MS SQL Express on .NET 2 - problems !
What does your connection string look like when trying to access it from a remote machine? Are you using SQL Express on the remote machine? Or SQL2005?
-tg
Re: Using MS SQL Express on .NET 2 - problems !
I don't have the SQL Server installed on the remote computer since I run the server on another computer.
Do I have to install the server application to use the computer as the client ?
I use this connetion string (same as on the last post) when connecting to the remote computer too.
Re: Using MS SQL Express on .NET 2 - problems !
.NET sp1 is for .NET 1.1 and you said you are using SQL Express 2005. The two aren't compatable. Also when the database is on a different computer you have to change the connection string to tell the program where the database is.
Re: Using MS SQL Express on .NET 2 - problems !
No, it's .NET 2.0 sp1. Released in juli/august I think.
But anyway ...
The program also crashes if I run it from a network station AT ny local machine. If I move the files to my local harddrive it works perfect, but then I move it back to the network drive and it crashes while opening the database.
Re: Using MS SQL Express on .NET 2 - problems !
There is no SP1 available for .NET 2.0. There is an SP1 available for SQL Server 2005, so that must be what you mean. That has no connection whatsoever to the .NET Framework or Visual Studio though.
Re: Using MS SQL Express on .NET 2 - problems !
Ok, listen, it's hard not to get frustrated at people asking about errors who don't mention what the error is! If jmcilhinney had a dime for every question he replied to in which the asker failed to provide all the relevant information...
Re: Using MS SQL Express on .NET 2 - problems !
Quote:
Originally Posted by hendelsesloysa
I don't have the SQL Server installed on the remote computer since I run the server on another computer.
Do I have to install the server application to use the computer as the client ?
I use this connetion string (same as on the last post) when connecting to the remote computer too.
Well geezzes.. you HAVE to change the connection string... to point to the remote computer... other wise it'll keep trying to connect to your PC. It needs to point to the remote server.
-tg