Re: help. can't connect to sql server express with OleDbConnection
- From: tommaso.gastaldi@xxxxxxxxxxx
- Date: 14 Apr 2006 11:43:28 -0700
I suggest to place a break and check that both strSqlServerName and
strSqlServerDbName are string equal to an existing mdb and catalog,
respectively. (For the mdb could use a file.exists. For the catalog can
check the oledbschemaGuid.)
-tom
aboutjav.com@xxxxxxxxx ha scritto:
Hi,
I have this code
try
{
m_DbConn = new OleDbConnection("Provider=SQLOLEDB.1;Data
Source="+strSqlServerName+"; Integrated Security=SSPI; Initial
Catalog="+strSqlServerDbName);
m_DbConn.Open();
m_bDbConnInUse = true;
}
catch (Exception e)
{
throw new Exception(e.Message.ToString());
}
to try to connection to sql server 2005 with OleDbConnection. It keep
saying that I can't connecto to the database.
Any help is greatly appreciated,
thanks,
aj
.
- Follow-Ups:
- Re: help. can't connect to sql server express with OleDbConnection
- From: Erland Sommarskog
- Re: help. can't connect to sql server express with OleDbConnection
- References:
- help. can't connect to sql server express with OleDbConnection
- From: aboutjav . com
- help. can't connect to sql server express with OleDbConnection
- Prev by Date: @Variable equivalent in OLEDB?
- Next by Date: Re: @Variable equivalent in OLEDB?
- Previous by thread: help. can't connect to sql server express with OleDbConnection
- Next by thread: Re: help. can't connect to sql server express with OleDbConnection
- Index(es):
Relevant Pages
|
|