Access Database Application to C# ADO.net application using visual web developer
Hey Guys,
I am to the .NET framework and I have a issue.
I basically have a application created in Access Forms, Queries, Tables etc. That I need brought to the web...
I am currently learning C# and ADO.Net using Sql Server express 2008 and Visual Web Developer Express 2008.
I want to know how would I be able to basically mimic what I have in Access to the web.
for instance:
I want a user to be able to update a record and i'm using the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
InsertIntoRecord.Insert();
}
protected void InsertDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
}
protected void TextBox10_TextChanged(object sender, EventArgs e)
{
}
}
But I am getting an error:
System.Data.SqlClient.SqlException was unhandled by user code
Message="Incorrect syntax near ')'."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=15
LineNumber=1
Number=102
Procedure=""
Server=""
State=1
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation)
at System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values)
at System.Web.UI.WebControls.SqlDataSource.Insert()
at _Default.Button1_Click1(Object sender, EventArgs e) in c:\Documents and Settings\eaohen\My Documents\Visual Studio 2008\WebSites\WebSite12\Default.aspx.cs:line 18
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
someone please help