|
-
Mar 1st, 2004, 05:38 AM
#1
Thread Starter
Addicted Member
simple ado.net question
Code:
conauthors = new oledbconnection ("provider........."; DATA Source=c:\Authors.mdb)
This is what i would use to set up a connection for a acces-db. I'd like to make an oledb-connection for my sql-server-db which is on a different computer in my network...
what should i use for data source?
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Mar 1st, 2004, 07:44 AM
#2
I wonder how many charact
You could benefit from using the SQL optimized code in the framework... SqlConnection , SQLCommand...etc.
I always let the Server Explorer write the connection for me, and then cut and paste the code it writes and put it wherever I need it.
-
Mar 1st, 2004, 09:04 AM
#3
Thread Starter
Addicted Member
thank you for answering.
What do you mean by server explorer or where can i find it?
I am trying it with a DSN now, looks like it works better...
cu,
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Mar 1st, 2004, 07:05 PM
#4
I wonder how many charact
You can find the Server Explorer from the View menu in the VS .Net IDE.
-
Mar 2nd, 2004, 04:19 AM
#5
Thread Starter
Addicted Member
i see, handy! i don't see anything i can copy and paste and then use for a connection string though...
regards,
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Mar 2nd, 2004, 08:55 AM
#6
I wonder how many charact
You can connect to the database with the server explorer, once you have properly connected, right-click the db in the explorer, and copy the entire string out of the connectString property.
You can also drag stored procedures onto your forms (when in Design mode), and it will automatically write the code for you.
-
Mar 2nd, 2004, 09:48 AM
#7
Thread Starter
Addicted Member
never argue with an idiot, he will bring you down to his level and will beat you through experience
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|