Results 1 to 8 of 8

Thread: Using MS SQL Express on .NET 2 - problems !

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    21

    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 ??

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    21

    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.

  4. #4
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    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.
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    21

    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.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    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...
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width