PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET How to connect to MSDE with C#

Reply

How to connect to MSDE with C#

 
Thread Tools Rate Thread
Old 09-02-2006, 06:35 PM   #1
aboutjav.com@gmail.com
Guest
 
Posts: n/a
Default How to connect to MSDE with C#


Hi,

I am new with ADO.net and MSDE. I work with SQL server, but our project
requires an export to MSDE. Currently, my connection string is

DbConn = new OleDbConnection("Provider=SQLOLEDB.1;Data
Source="+strSqlServerName+"; Initial Catalog="+strSqlServerDbName+";
uid="+m_strDbUserName+";pwd="+m_strDbPassword);


How do I modify this to find my MSDE database and connect to it? Also,
how do I find the name of the MSDE database server on my PC?

Thanks,

AJ

  Reply With Quote
Old 09-02-2006, 07:00 PM   #2
W.G. Ryan - MVP
Guest
 
Posts: n/a
Default Re: How to connect to MSDE with C#


<aboutjav.com@gmail.com> wrote in message
news:1139510142.047823.286330@o13g2000cwo.googlegroups.com...
> Hi,
>
> I am new with ADO.net and MSDE. I work with SQL server, but our project
> requires an export to MSDE. Currently, my connection string is
>
> DbConn = new OleDbConnection("Provider=SQLOLEDB.1;Data
> Source="+strSqlServerName+"; Initial Catalog="+strSqlServerDbName+";
> uid="+m_strDbUserName+";pwd="+m_strDbPassword);
>
>
> How do I modify this to find my MSDE database and connect to it?

-http://www.connectionstrings.com/ (expand the Sql Server 2005 node)
Also,
> how do I find the name of the MSDE database server on my PC?

-http://www.codeproject.com/cs/database/SubmitSQLInfoEnumerator.asp

>
> Thanks,
>
> AJ
>



  Reply With Quote
Old 10-02-2006, 11:23 AM   #3
Val Mazur \(MVP\)
Guest
 
Posts: n/a
Default Re: How to connect to MSDE with C#

Hi,

MSDE is a SQL Server, but just a light version of it and some limitations.
It means, to connect to it from your code, you are using exact same
connection. There is no difference. You suppose to see service running for
your MSDE and there you could check your MADE server name.


--
Val Mazur
Microsoft MVP
http://xport.mvps.org


<aboutjav.com@gmail.com> wrote in message
news:1139510142.047823.286330@o13g2000cwo.googlegroups.com...
> Hi,
>
> I am new with ADO.net and MSDE. I work with SQL server, but our project
> requires an export to MSDE. Currently, my connection string is
>
> DbConn = new OleDbConnection("Provider=SQLOLEDB.1;Data
> Source="+strSqlServerName+"; Initial Catalog="+strSqlServerDbName+";
> uid="+m_strDbUserName+";pwd="+m_strDbPassword);
>
>
> How do I modify this to find my MSDE database and connect to it? Also,
> how do I find the name of the MSDE database server on my PC?
>
> Thanks,
>
> AJ
>



  Reply With Quote
Old 10-02-2006, 05:20 PM   #4
William \(Bill\) Vaughn
Guest
 
Posts: n/a
Default Re: How to connect to MSDE with C#

With ADO.NET you should use the SqlClient SQL Server provider for all
versions of SQL Server 7.0 or higher. See my blog for a detailed checklist
on getting connected.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

<aboutjav.com@gmail.com> wrote in message
news:1139510142.047823.286330@o13g2000cwo.googlegroups.com...
> Hi,
>
> I am new with ADO.net and MSDE. I work with SQL server, but our project
> requires an export to MSDE. Currently, my connection string is
>
> DbConn = new OleDbConnection("Provider=SQLOLEDB.1;Data
> Source="+strSqlServerName+"; Initial Catalog="+strSqlServerDbName+";
> uid="+m_strDbUserName+";pwd="+m_strDbPassword);
>
>
> How do I modify this to find my MSDE database and connect to it? Also,
> how do I find the name of the MSDE database server on my PC?
>
> Thanks,
>
> AJ
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off