Monday, March 12, 2012

Issues

Hi,
I've installed SQL Express as the default 'SQLExpress' install (windows
authentication) and while I can connect fine to my created databases from VS
Web Edition 2005 (using the test server) I cannot get access to the database
s
from IIS http://localhost/test.aspx for example. I've worked through variou
s
issues to get to this point and I now just want to use a connection string
i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
Database=Pandora; Server=WireslessBliss;"; to connect to my database and
while it doesn't initially throw an error as soon as I run the
objConn.Open(); line:
SqlConnection objConn = new SqlConnection(strConn);
SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;", objConn);
objConn.Open();
(using the namespaces <%@. Import Namespace="System.Data"%>
<%@. Import Namespace="System.Data.SqlClient"%> )
it says this...Exception Details: System.Data.SqlClient.SqlException:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding. And points to the objConn.Open()
;
line.
I am really frustrated by this as all I am trying to do is connect so I can
do a little hand coding without VS to get more of a feel for whats going on
with dotNet. I am just starting SQL Express as a move up from Access
Can someone PLEASE help!!
Thanks in advance.
AlexTry this one:
Dim cn As ADODB.Connection
Set cn = New Connection
cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"AttachDBFileName=" & App.Path & "\BDatos.mdf;Data
Source=servidor\sqlexpress"
73
"Alex" <Alex@.discussions.microsoft.com> escribi en el mensaje
news:40FA2342-7D46-44B4-A18A-3626B4C06541@.microsoft.com...
> Hi,
> I've installed SQL Express as the default 'SQLExpress' install (windows
> authentication) and while I can connect fine to my created databases from
> VS
> Web Edition 2005 (using the test server) I cannot get access to the
> databases
> from IIS http://localhost/test.aspx for example. I've worked through
> various
> issues to get to this point and I now just want to use a connection string
> i.e. string strConn = "Initial Catalog=Pandora; Integrated Security=True;
> Database=Pandora; Server=WireslessBliss;"; to connect to my database and
> while it doesn't initially throw an error as soon as I run the
> objConn.Open(); line:
> SqlConnection objConn = new SqlConnection(strConn);
> SqlCommand objCommand = new SqlCommand("SELECT * FROM CatInfo2;",
> objConn);
> objConn.Open();
> (using the namespaces <%@. Import Namespace="System.Data"%>
> <%@. Import Namespace="System.Data.SqlClient"%> )
> it says this...Exception Details: System.Data.SqlClient.SqlException:
> Timeout expired. The timeout period elapsed prior to completion of the
> operation or the server is not responding. And points to the
> objConn.Open();
> line.
> I am really frustrated by this as all I am trying to do is connect so I
> can
> do a little hand coding without VS to get more of a feel for whats going
> on
> with dotNet. I am just starting SQL Express as a move up from Access
> Can someone PLEASE help!!
> Thanks in advance.
> Alex

No comments:

Post a Comment