TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
malendrah
NA
1
0
Connect to a remote database
Jan 13 2005 7:22 AM
Hi I have a database on my computer( msde ) . All I want to do is connect to that Db and enter some data from another pc. When I use it on my pc it works but from another pc it fails. They are on the same network and can see each other. The error message is SQL server does not exist or acess is denied This is my code //------------------------------------------------------------ ---------------------------------- try { string connectionString = "Initial Catalog=Northwind;Data Source=blackie;Integrated Security=SSPI;"; SqlConnection myConnection = new SqlConnection(connectionString); myConnection.Open(); if( myConnection.Database.Length > 0 ) { MessageBox.Show( "Db Open" , "Open" ); } } catch( Exception ex ) { MessageBox.Show( "Db Closed" + ex.Message , "Closed" ); } //------------------------------------------------------------ ---------------------------------- Also should I be using a OleDbConnection for this . I am using mix mode for security thanks
Reply
Answers (
2
)
Managing SQL Server using C#
How to update multiple tables to database???