Inserting into SQL Server
- From: VJ <vncntj@xxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 13:12:04 -0800
This is the first time I've tried this...
I've got this syntax:
void Page_Load(Object src, EventArgs E) {
string connectionStr =
@"server=111.111.111.111;uid=DDATA/web;pwd=web;trusted_connection=true;d
atabase=events";
string insertQuery = "Insert into Events VALUES " +
"('"+Session["Name"]+"', '"+Session["Phones"]+"')";
SqlConnection connectObj = new SqlConnection(connectionStr);
SqlCommand commandObj = new SqlCommand(insertQuery, connectObj);
commandObj.Connection.Open();
commandObj.ExecuteNonQuery();
commandObj.Connection.Close();
}
The error message I get is this...
Login failed for user '(null)'
I have two application servers DDATA (111.111.111.111) AND DWEB on the
same DOMAIN...
I'm trying to use an insert statement (confirm.aspx) on DWEB into a sql
server DDATA.
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
.
- Follow-Ups:
- Re: Inserting into SQL Server
- From: Paul Clement
- Re: Inserting into SQL Server
- Prev by Date: RE: ASP.Net 2.0: Problem User.isinrole() <domain>\<user> instead o
- Next by Date: Re: The application's configuration files must contain 'trust' section
- Previous by thread: Restricted permission on subfolder
- Next by thread: Re: Inserting into SQL Server
- Index(es):