ASP.Net and Sql server database Connection problem ??

ASP.Net and Sql server database Connection problem ??

I want to insert the records in to the sql server database
My code is :-
Dim strInsert As String
strInsert = "insert into personal (Title,FirstName,LastName) values ( '" & Me.TitleList.SelectedItem.Text & "','" & Me.firstName.Text & "','" & Me.lastName.Text & "' )"
Dim con As New OleDbConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Migration;Data Source=localhost;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MAC04;Use Encryption for Data=False;Tag with column collation when possible=False")
Dim cmd As New OleDbCommand(strInsert, con)
Dim Added As Integer
Added = cmd.ExecuteNonQuery
Textbox1.Text = Added.ToString & " records inserted."
Catch err As Exception
Textbox1.Text = "Error inserting record." & err.Message
If (Not con Is Nothing) Then
End If
End Try
Giving Error :
'Error inserting record.Login failed for user 'MAC04\ASPNET'.
Please help me.
8/8/2003 6:40:54 AM 93655 articles. 6 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 26

The error means that you are using the default ASPNET user for you application, but it doesn't have permissions in the database. You need to either give ASPNET access to the database or run your app under another user.

Don Kiely, MCP, MCSD
In the Last Frontier, Interior Alaska
Please post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem!
8/8/2003 6:57:35 AM

Similar Artilces:

problems connecting to my SQL server database in .NET
I am able to connect and display data in classic asp just fine, but I cannot connect to my database using ASP.NET. I have tried 2 tutorials on here and neither has worked. They both give me the same error: "Login failed for user 'NASHIE\ASPNET'." I am currently working on this tutorial: "Display Data with MxDataGrid" [wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server" UpdateCommand="" SelectCommand="SELECT * FROM [Orders]" ConnectionString="...

Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000)
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider...

can't connect to sql server database with same connection used in visual studio .net 2003
I have the following code that works fine in visual studio .net 2003 but not with VWD.  I have sql server 2000 developer edition installed locally and this connection works fine with visual studio.  With VWD it fails with the exception "System.Data.SqlClient.SqlException: Login failed for user 'DARRELL\ASPNET'".  It fails on the conn.Open line.   any ideas on what the issue is?Dim conn As SqlConnectionDim connstr As Stringconnstr = "Data Source=DARRELL;Initial Catalog=Event;Integrated Security=SSPI;"Dim daEvents As New SqlDataAdapter("select * from events", connstr...

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

ADO.Net connection problems with SQL Server 2005
Hi. Im try to use ADO.Net for connection to SQL Server 2005. In my developer workstation connection work fine, but in the clients, don�t connect. .Net 2.0 is installed, SQL Client for sql server 2005 is installed Help me please. Hi, In general, if you have registered the following 2 DLLs,ADO will work Sybase.PowerBuilder.Db.dll Sybase.PowerBuilder.DbExt.dll they are located under the folder Disk:\Program Files\Sybase\powerbuilder 11 You can get the folder from registry HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\11.0->Location &quo...

Sql server connection problem
I have a problem connecting my application written in c# ( webform code behind) to my SQL server 2000 database. My authentication mechanism is windows-intergrated authentication, my connection string is "Data Source =(local);Initial Catalog = database; Integrated security = SSPI". I tried different connection string (even copy and paste the connection string property of the database link in visual studio .net) but without success. I even tried to create the connection string in designer (which was success in C# windows form) but I still received the message: "SQ...

Problems connecting to an SQL database on my external web hosting server
I am very new to ASP.NET and am having lots of problems trying to host a simple membership application on a Fasthosts server.  I can FTP pages up to the server and I can browse them but as soon as the 'login' control or 'create user' control attempts to access my 'database' I get the following error msg: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces,...

problem with Connecting to a SQL Anywhere Studio Database Using ADO.NET
I am trying to connect and read the data from the asademo.db database that is used in the document "Connecting to a SQL Anywhere Studio Database Using ADO.NET ". I am using Sql Anywhere v7.0 and MS Visual Studio .Net 2003 with C#. I can connect to the database but I get a 'Specific cas is not valid' exception when I try to run the myReader = myCommand.ExecuteReader() line in the demo course. Can anyone tell me why it is not working? I'm getting the same error using V7.0.2.1402. Did you find any solution/workaround? You need a more recent version of the A...

.net 1 .. connection string problem with sql server 2005 SP2
Hi All,  I have a prpblem that drivnig me mad... I have some old projects in .net 1 that I am having to move the databases. At the moment the webistes and database are on the same server. I have now moved the database but the connectionn string in the webconfig no longer works. I am using the following connection string.  <add key="ConnectionString"  value="  Server=xx.xx.xx.xx; Network=DBMSSOCN; Database=xxxxxxx; Uid=xx; Pwd=xxxxxxxx;"/>  When the website resides on the same server the connection string works but when they are on d...

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Problem with Web Site Admin Tool: Unable to connect to SQL Server database
 I'm getting the following error when I run the Web Site Admin tool against a SQL Server 2000 server (not the express server) with all the provider tables installed in the Northwind database.   The error occurs after I bring up the Tool, click Security, then click on either Create/Manage Roles or Create/Manage Rules. Unable to connect to SQL Server database. at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[] paramTypes) at ASP.security_roles_manageallroles_aspx.BindGrid() at ASP.security_...

pb 10.0-sql server connect problem
Hi, I am using Powerbuilder 10.0 , XP SP2 , Microsoft SQL Server 2000 and the Net Framework is installed. I am having problem connecting to Microsoft SQLSERVER 2000 using ADO.NET My connection is // Profile sqlado SQLCA.DBMS = "TRACE ADO.Net" SQLCA.LogPass = "123" SQLCA.LogId = "sa" SQLCA.AutoCommit = True SQLCA.DBParm="Namespace='System.Data.OleDb',DATASOURCE='internetpc' ,Database='db1',Provider='SQLOLEDB',PROVIDERSTRING='database=db1' ,DelimitIdentifier='Yes',PBCatalogOwner='dbo',Default...

Cannot connect to SQL Server database using after IP address has changed
Dear all, I wasn't able to connect to my SQL server 2000 database (which reside in the network in a windows 2003 server) after the IP address of the server has changed and the server is shut down, moved and re-started. I was able to connect to this server by using ADO using VB. I was able to register this server in my EM and was able to create ODBC connection. Just when using ADO.NET, I wasn't able to connect. Any ideas? Will there be any caching within ADO.NET still pointing to the old IP address? Thank you for all the help in advance. There are a lot of variable possibilites her...

How to connect Microsoft Visual Basic .NET to MS SQL Web Server 2000?
Need to connect VB .NET to MS SQL Web Server database. The message is "Can not  connect databases remotely" Thank you!ASP.NET Hosting...

Web resources about - ASP.Net and Sql server database Connection problem ?? -

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video -
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

The Direct Connection
... And the people reading my words respond back to me with words of their own. The technology that allows this is powerful but this direct connection ...

Is There A Connection Between Patrick Murphy's Over-The-Top Corruption And His Campaign Emails?
The DCCC may be stupid or even very stupid (as well as utterly incompetent) but their e-mail strategy is very well-planned out. Their overarching ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Mali arrests 2 in connection with deadly hotel attack
Mali arrests 2 in connection with deadly hotel attack

Resources last updated: 12/1/2015 1:21:59 PM