B
Bob
Having trouble getting started.
I created an instance of MSDE called VSDOTNET on a computer with the
name of sysdev.
Using MS SQL Web Adminstrator I created a database called temp with a
table called customer.
In Visual Studio .NET I can see and access the data in the table. The
dataconnection is called sysdev\vsdotnet\temp.dbo
The connection string in the properties window is:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=temp;Data Source=sysdev\vsdotnet;Use
Procedure for Prepare=1;Auto Translate=True;Packet
Size=4096;Workstation ID=SYSDEV;Use Encryption for Data=False;Tag with
column collation when possible=False
However with an application (this case a webform, .aspx) I can not
access the data. I keep getting the error message below.
Any help with why this doesn't work?
Server Error in '/' Application.
--------------------------------------------------------------------------------
SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: SQL Server does
not exist or access denied.
Source Error:
Line 10:
Line 11: conPubs = new SqlConnection(
"Server=sysdev\vsdotnet;uid=bob;pwd=isgood;database=temp" );
Line 12: conPubs.Open();
Line 13: cmdSelectAuthors = new SqlCommand( "Select fn From
customer", conPubs );
Line 14: dtrAuthors = cmdSelectAuthors.ExecuteReader();
Source File: c:\inetpub\wwwroot\sqldatareader.aspx Line: 12
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
ASP.SqlDataReader_aspx.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\sqldatareader.aspx:12
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
I created an instance of MSDE called VSDOTNET on a computer with the
name of sysdev.
Using MS SQL Web Adminstrator I created a database called temp with a
table called customer.
In Visual Studio .NET I can see and access the data in the table. The
dataconnection is called sysdev\vsdotnet\temp.dbo
The connection string in the properties window is:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=temp;Data Source=sysdev\vsdotnet;Use
Procedure for Prepare=1;Auto Translate=True;Packet
Size=4096;Workstation ID=SYSDEV;Use Encryption for Data=False;Tag with
column collation when possible=False
However with an application (this case a webform, .aspx) I can not
access the data. I keep getting the error message below.
Any help with why this doesn't work?
Server Error in '/' Application.
--------------------------------------------------------------------------------
SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: SQL Server does
not exist or access denied.
Source Error:
Line 10:
Line 11: conPubs = new SqlConnection(
"Server=sysdev\vsdotnet;uid=bob;pwd=isgood;database=temp" );
Line 12: conPubs.Open();
Line 13: cmdSelectAuthors = new SqlCommand( "Select fn From
customer", conPubs );
Line 14: dtrAuthors = cmdSelectAuthors.ExecuteReader();
Source File: c:\inetpub\wwwroot\sqldatareader.aspx Line: 12
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
ASP.SqlDataReader_aspx.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\sqldatareader.aspx:12
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()