Updating Database From Form Error Message
Jan 19, 2005
I am getting an error message when trying to up to update a database from a form. It appears a simple looking error but I can't seem to see what the problem is
Any ideas would be appreciated
This is the error message
Line 1: Incorrect syntax near '('.
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: Line 1: Incorrect syntax near '('.
Source Error:
Line 95: sqlConnection.Open
Line 96: Try
Line 97: rowsAffected = sqlCommand.ExecuteNonQuery
Line 98: Finally
Line 99: sqlConnection.Close
Source File: D:Webspacewebs4cInetpubwwwrootkerslakeAdminUpdate.aspx Line: 97
Stack Trace:
[SqlException: Line 1: Incorrect syntax near '('.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +194
ASP.Update_aspx.Update(Int32 lifestyleID, String clientFirstName, String clientSurname, String clientStreet, String clientTown, String clientState, String clientPhone, String clientMOB, String clientEmail, Int32 methodContact, String occupation, String selfEmployed, String company, String address, String other, String progress, DateTime lastUpdate, String dOB, String prefferedTime) in D:Webspacewebs4cInetpubwwwrootkerslakeAdminUpdate.aspx:97
ASP.Update_aspx.Update(Object Source, EventArgs E) in D:Webspacewebs4cInetpubwwwrootkerslakeAdminUpdate.aspx:321
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
THIS IS THE CODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function Update( _
ByVal lifestyleID As Integer, _
ByVal clientFirstName As String, _
ByVal clientSurname As String, _
ByVal clientStreet As String, _
ByVal clientTown As String, _
ByVal clientState As String, _
ByVal clientPhone As String, _
ByVal clientMOB As String, _
ByVal clientEmail As String, _
ByVal methodContact As Integer, _
ByVal occupation As String, _
ByVal selfEmployed As String, _
ByVal company As String, _
ByVal address As String, _
ByVal other As String, _
ByVal progress As String, _
ByVal lastUpdate As Date, _
ByVal dOB As String, _
ByVal prefferedTime As String) As Integer
Dim connectionString As String = "server='202.xxxxxxx; user id='webs4c'; password='xxxxxxx'; database='xxxx'"
Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "UPDATE [Lifestyle] ([LifestyleID], [ClientFirstName], [ClientSurname], [ClientStr"& _
"eet], [ClientTown], [ClientState], [ClientPhone], [ClientMOB], [ClientEmail], [M"& _
"ethodContact], [Occupation], [SelfEmployed], [Company], [Address], ["& _
"Other], [Progress], [LastUpdate], [DOB], [PrefferedTime]) VALUES "& _
"(@UserID, @ClientFirstName, @ClientSurname, @ClientStreet, @ClientTown, @ClientS"& _
"tate, @ClientPhone, @ClientMOB, @ClientEmail, @MethodContact, @Occupation, @Self"& _
"Employed, @Company, @Address, @Other,@Progress, @LastU"& _
"pdate, @DOB, @PrefferedTime WHERE ([Lifestyle].[L"& _
"ifestyleID] = @LifestyleID)"
Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)
sqlCommand.Parameters.Add("@LifestyleID", System.Data.SqlDbType.Int).Value = lifestyleID
sqlCommand.Parameters.Add("@ClientFirstName", System.Data.SqlDbType.NVarChar).Value = clientFirstName
sqlCommand.Parameters.Add("@ClientSurname", System.Data.SqlDbType.NVarChar).Value = clientSurname
sqlCommand.Parameters.Add("@ClientStreet", System.Data.SqlDbType.NVarChar).Value = clientStreet
sqlCommand.Parameters.Add("@ClientTown", System.Data.SqlDbType.NVarChar).Value = clientTown
sqlCommand.Parameters.Add("@ClientState", System.Data.SqlDbType.NVarChar).Value = clientStreet
sqlCommand.Parameters.Add("@ClientPhone", System.Data.SqlDbType.NVarChar).Value = clientPhone
sqlCommand.Parameters.Add("@ClientMOB", System.Data.SqlDbType.NVarChar).Value = clientMOB
sqlCommand.Parameters.Add("@ClientEmail", System.Data.SqlDbType.NVarChar).Value = clientEmail
sqlCommand.Parameters.Add("@MethodContact", System.Data.SqlDbType.Int).Value = methodContact
sqlCommand.Parameters.Add("@Occupation", System.Data.SqlDbType.NVarChar).Value = occupation
sqlCommand.Parameters.Add("@SelfEmployed", System.Data.SqlDbType.NVarChar).Value = selfEmployed
sqlCommand.Parameters.Add("@Company", System.Data.SqlDbType.NVarChar).Value = company
sqlCommand.Parameters.Add("@Address", System.Data.SqlDbType.NVarChar).Value = address
sqlCommand.Parameters.Add("@Other", System.Data.SqlDbType.NVarChar).Value = other
'sqlCommand.Parameters.Add("@DateEnquiry", System.Data.SqlDbType.DateTime).Value = dateEnquiry
sqlCommand.Parameters.Add("@Progress", System.Data.SqlDbType.NVarChar).Value = progress
sqlCommand.Parameters.Add("@LastUpdate", System.Data.SqlDbType.DateTime).Value = lastUpdate
sqlCommand.Parameters.Add("@DOB", System.Data.SqlDbType.NVarChar).Value = dOB
sqlCommand.Parameters.Add("@PrefferedTime", System.Data.SqlDbType.NVarChar).Value = prefferedTime
Dim rowsAffected As Integer = 0
sqlConnection.Open
Try
rowsAffected = sqlCommand.ExecuteNonQuery
Finally
sqlConnection.Close
End Try
Return rowsAffected
End Function
END CODE
View 2 Replies
ADVERTISEMENT
Jan 5, 2008
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30456: 'InserParameters' is not a member of 'System.Web.UI.WebControls.SqlDataSource'.Source Error:
Line 15: registrationDataSource.InsertCommand = "INSERT TO Reputation (firstname, lastname)VALUES(@First Name, @Last Name)"
Line 16:
Line 17: registrationDataSource.InserParameters.Add("firstname", firstname.txt)
Line 18: registrationDataSource.InserParameters.Add("lastname", lastname.txt)
Line 19: Source File: C:UsersQaiphyx
eputationDefault.aspx.vb Line: 17
Show Detailed Compiler Output:
View 1 Replies
View Related
Apr 22, 2008
i wanted to ask how to insert values from a single web form into two sql tables, i have been looking and the visual web developer i use doesnt seam to allow me to even atempt it i've tried selecting all the values from two different tables and then adding those two tables to an insert function but it doesnt work likewise the update functioni have values in a table currently a reference number and i want to use this reference number to update the address values in this table so update this field.table1 and thisfield.table2 when ref number = @ refnumber the reference number is present in both tables and is linked PK to FK <asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:Back End DataConnectionString %>"
SelectCommand="SELECT StartDetails.StartDetailsID, StartDetails.ContractIDNo, StartDetails.ContractName, StartDetails.NINO, StartDetails.AnticipatedStartDate, StartDetails.StartDateTime, StartDetails.StartDateLetterSent, StartDetails.StartDate, StartDetails.AnticipatedEndDate, StartDetails.ActualEndDate, StartDetails.ReasonForLeaving, StartDetails.Provider, StartDetails.AdviserReferrer, StartDetails.ProvisionCat, StartDetails.Provision, ClientDetails.NINO AS Expr1, ClientDetails.CentreNo, ClientDetails.FirstName, ClientDetails.SecondName, ClientDetails.AddressLine1, ClientDetails.AddressLine2, ClientDetails.PostCode, ClientDetails.ContactTelephoneNumber, ClientDetails.MobileNo, ClientDetails.Email, ClientDetails.DateOfBirth, ClientDetails.Gender, ClientDetails.PWD, ClientDetails.Ethnicity, ClientDetails.ClientGroup, ClientDetails.RepeatStartDate, ClientDetails.CaseworkerName, ClientDetails.ClientStatus, ClientDetails.PlacementDates, ClientDetails.JobsearchDay, ClientDetails.AchievedILP, ClientDetails.JobDate, ClientDetails.JobDate2, ClientDetails.JobDate3, ClientDetails.EligibleForRolledUpWeeks, ClientDetails.NoOfWeeksClaimed, ClientDetails.MarketingWhere, ClientDetails.Notes, ClientDetails.JobCentre, ClientDetails.JobCentreRep FROM StartDetails INNER JOIN ClientDetails ON StartDetails.NINO = ClientDetails.NINO WHERE (StartDetails.StartDetailsID = @StartDetailsID) AND (StartDetails.NINO = @NINO)"
InsertCommand="INSERT INTO [StartDetails] ([NINO], [StartDate], [AnticipatedEndDate]) VALUES (@NINO, @StartDate, @AnticipatedEndDate)"
UpdateCommand="UPDATE [StartDetails] SET [StartDate] = @StartDate, [AnticipatedEndDate] = @AnticipatedEndDate WHERE [StartDetailsID] = @StartDetailsID,[NINO] = @NINO">
<SelectParameters>
<asp:QueryStringParameter Direction="InputOutput" Name="StartDetailsID"
QueryStringField="StartDetailsID" />
<asp:QueryStringParameter Direction="InputOutput" Name="NINO"
QueryStringField="NINO" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="AnticipatedEndDate" Type="DateTime" />
<asp:Parameter Name="StartDetailsID" Type="Int32" />
<asp:Parameter Name="NINO" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="NINO" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="AnticipatedEndDate" Type="DateTime" />
</InsertParameters>
</asp:SqlDataSource> your coinsideration is appreciatedChris
View 4 Replies
View Related
Mar 29, 2006
Hi,
I have a problem loading data from a flat file into a DB2 Dtabase by using the OLE DB Provider for DB2.
I read the data from a flat file in the unicode format and as soon as the data is to be written in the DB2 database the following error occurs and the loading process is aborted:
Information: 0x402090DE at Data Flow Task, Flat File Source [813]: The total number of data rows processed for file "C:Dokumente und EinstellungenAdministratorDesktopSSIS1.txt" is 2.
Error: 0xC0202009 at Data Flow Task, OLE DB Destination [842]: An OLE DB error has occurred. Error code: 0x80040E53.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: The ProcessInput method on component "OLE DB Destination" (842) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0xC0202009.
Information: 0x40043008 at Data Flow Task, DTS.Pipeline: Post Execute phase is beginning.......
......Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package 1.dtsx" finished: Failure.
I dont know waht those error codes meanand I tried so many things already. The tables in the database are created correctly and also, SSIS can read the data from the database if I use the preview function, but somehow, the program never starts to write data into the database for some reason. Can anyone help me???
Thx, andy
View 3 Replies
View Related
Mar 29, 2006
Hi,
I have a problem loading data from a flat file into a DB2 Dtabase by using the OLE DB Provider for DB2.
I read the data from a flat file in the unicode format and as soon as the data is to be written in the DB2 database the following error occurs and the loading process is aborted:
Information: 0x402090DE at Data Flow Task, Flat File Source [813]: The total number of data rows processed for file "C:Dokumente und EinstellungenAdministratorDesktopSSIS1.txt" is 2.
Error: 0xC0202009 at Data Flow Task, OLE DB Destination [842]: An OLE DB error has occurred. Error code: 0x80040E53.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: The ProcessInput method on component "OLE DB Destination" (842) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0xC0202009.
Information: 0x40043008 at Data Flow Task, DTS.Pipeline: Post Execute phase is beginning.......
......Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package 1.dtsx" finished: Failure.
I dont know waht those error codes meanand I tried so many things already. The tables in the database are created correctly and also, SSIS can read the data from the database if I use the preview function, but somehow, the program never starts to write data into the database for some reason. Can anyone help me???
Thx, andy
View 2 Replies
View Related
Dec 7, 2006
Hi,
I am currently using VC++/Cli 2005. In a project, I'm using a DataGridView control to show records from a SQL Express 2005 table. Instead of updating a specific item directly within DataGridView control, I would like to open a new form and allow user to update selected record/item within that form. The reason to update this way is conditionned by the fact that I have 3 levels of detail as following:
Level 0 Level 1 Level 2
1:N 1:N
Furniture --> Component --> Component
You all understand that update form of Level1 will/must include, as Level0 do, another DataGridView control to display/detail all related items issued from next level. This explains why I can't allow user to update Level 1 directly from DataGridView control.
I've searched in MSDN and even bought a few books on subject but unfortunately I found nothing on how to do it this way. All articles on DataGridView control were only showing how to update record directly from control.
My approach, I think, would be to transmit to my level1 updating form, as a single parameter, the selected DataRow object (or a brand new one if currently adding) issued from DataGridView and let user update it's content. When User finally leaves level0 update form, then I presume that DataGridView corresponding table would be automatically updated according to DataGridView's content.
What would be the proper way to do it? I would certainly appreciate to hear you view on this.
Also, what can I do if I want to refresh DataGridView's content when coming back from update form. Is it done automatically? I would certainly be sure that it reflects the reality, not only when I update it myself but also especially when other users could concurrently update same records?
Thanks in advance,
Stéphane
View 7 Replies
View Related
Oct 28, 2004
Hi all,
I'm getting an error when updating my database. The connection is fine and the dropdown menu is good also so i think it's the way i've formed my sql string. Here's the line i think i'm having probs with:
SQLString = "UPDATE project_descriptions SET " & _
"lecturer_name = '" & Replace(LecturerName.Text,"'","''") & "'," & _
"project_title = '" & Replace(ProjectTitle.Text,"'","''") & "', " & _
"Project_description = '" & Replace(ProjectDescription.Text,"'","''") & "'," & _
" WHERE project_code = '" & ProjectCode.SelectedItem.Value & "'"
Can anyone rearrange it so i stop getting an error?
Here's my code. if it helps.
<%@ Import Namespace="System.Data.OleDb" %>
<SCRIPT language="VB" runat="server">
Dim DBConnection As OleDbConnection
Dim DBCommand As OleDbCommand
Dim DBReader As OleDbDataReader
Dim SQLString As String
Sub Page_Load
If Not Page.IsPostBack Then
'-- Load drop-down list with item numbers
DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:finalyearproject2projectallocation.mdb")
DBConnection.Open()
SQLString = "SELECT project_code FROM project_descriptions ORDER BY project_code"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBReader = DBCommand.ExecuteReader()
ProjectCode.DataSource = DBReader
ProjectCode.DataTextField = "project_code"
ProjectCode.DataValueField = "project_code"
ProjectCode.DataBind()
DBReader.Close()
DBConnection.Close()
End If
End Sub
Sub SelectRecord (Src As Object, Args As EventArgs)
DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:finalyearproject2projectallocation.mdb")
DBConnection.Open()
SQLString = "SELECT * FROM project_descriptions WHERE " & _
"project_code = '" & ProjectCode.SelectedItem.Value & "'"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBReader = DBCommand.ExecuteReader()
DBReader.Read()
LecturerName.Text = DBReader("lecturer_name")
ProjectTitle.Text = DBReader("project_title")
ProjectDescription.Text = DBReader("project_description")
DBReader.Close()
DBConnection.Close()
UpdateButton.Visible = True
End Sub
Sub UpdateRecord (Src As Object, Args As EventArgs)
'-- CHECK FOR VALID RECORD ---
Dim ValidRecord As Boolean = True
'-- Check for missing Project Title
If ProjectTitle.Text = "" Then
ProjectTitleMessage.Text = "Missing Project Title"
ValidRecord = False
End If
'-- Check for missing Lecturer Name
If LecturerName.Text = "" Then
LecturerNameMessage.Text = "Missing Lecturer Name"
ValidRecord = False
End If
'-- Check for missing Project Description
If ProjectDescription.Text = "" Then
ProjectDescriptionMessage.Text = "Missing Project Description"
ValidRecord = False
End If
If ValidRecord = True Then
'-- UPDATE A RECORD --
Try
DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:finalyearproject2projectallocation.mdb")
DBConnection.Open()
SQLString = "UPDATE project_descriptions SET " "lecturer_name = '" & Replace(LecturerName.Text,"'","''") & "'," "project_title = '" & Replace(ProjectTitle.Text,"'","''") & "', " "Project_description = '" & Replace(ProjectDescription.Text,"'","''") & "'," " WHERE project_code = '" & ProjectCode.SelectedItem.Value & "'"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBCommand.ExecuteNonQuery
DBConnection.Close()
UpdateMessage.Text = "Record updated"
Catch
UpdateMessage.Text = "Update problem. Record not changed. " & SQLString
End Try
End If
End Sub
</SCRIPT>
<html>
<head>
<style>
.head {font-family:arial; font-size:12pt; font-weight:bold; width:560px;
border:outset 1 #F0F0F0; padding:2pt; background-color:#990000;
color:#FFFFFF; text-align:center}
.box {font-family:arial; font-size:8pt; line-height:9pt; width:200px;
height:20px; overflow:auto}
.right {text-align:right}
.center {text-align:center}
table {font-family:arial; font-size:8pt; line-height:9pt; width:560px;
background-color:#F9F9F9; border-collapse:collapse}
th {font-family:arial; font-size:8pt; line-height:14pt;
font-weight:bold; text-align:center; vertical-align:bottom;
background-color:#990000; color:#FFFFFF}
td {font-family:arial; font-size:8pt; line-height:9pt;
vertical-align:top}
</style>
</head>
<body>
<form runat="server">
<div class="head">Project Update</div>
<table id="UpdateTable" border="1" rules="rows">
<tr>
<th> Project Code: </th>
<td><asp:DropDownList id="ProjectCode" runat="server"/>
<asp:Button Text="Select" OnClick="SelectRecord" runat="server"/>
</td>
<td></td>
</tr>
<tr>
<th> Lecturer Name: </th>
<td><asp:TextBox id="LecturerName" runat="server"
Columns="40"
MaxLength="50"/></td>
<td><asp:Label id="LecturerNameMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr>
<tr>
<th> Project Title: </th>
<td><asp:TextBox id="ProjectTitle" runat="server"
Columns="40"
MaxLength="50"/></td>
<td><asp:Label id="ProjectTitleMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr>
<tr>
<th> Project Description: </th>
<td><asp:TextBox id="ProjectDescription" runat="server"
TextMode="MultiLine"
Columns="45"
rows="3"/></td>
<td><asp:Label id="ProjectDescriptionMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr>
</asp:Panel>
</table>
<br>
<asp:Button id="UpdateButton" runat="server"
Text="Update Record"
Visible="False"
OnClick="UpdateRecord"/>
<asp:Label id="UpdateMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/>
</form>
</body>
</html>
View 4 Replies
View Related
Jul 13, 2007
I am receiving the following error message when I am trying to restore a database in SQL Express 2005. Has anyone ever seen it before?
microsoft.sqlserver.express.connectionInfo
View 2 Replies
View Related
Dec 15, 2004
well i have got a form which displays some result from the databasse, it runs fi9 in webmatrix, but when i try to run it from my main page and when i click on that button which should displays the aspx page, it gives me this error:
############################################################
Server Error in '/' Application.
--------------------------------------------------------------------------------
Login failed for user 'MUFADDALASPNET'.
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: Login failed for user 'MUFADDALASPNET'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: Login failed for user 'MUFADDALASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.PopulateDataSet(DataSet dataSet, String listName) +494
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.GetDataSource(String listName) +51
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.ResolveDataSource() +95
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.DataBind() +59
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.DataBind() +10
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.OnPreRender(EventArgs e) +62
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
############################################################
i have kept no passwords in my mssql server 2000 database
can anyone help me out with this problem
View 2 Replies
View Related
Jan 25, 2005
Hi
I created database using SQL server and runs under Cassini. The creation of database is ok but I have a problem when I am creating the table in database. Whenever I execute the code to create the tables, it shows the error message like 'Server not found' or just hang there. Does anybody know why it hang while I am creating the table? Is it because of the code or it's the time out error. Pls help as I am very new to this area.
MZ
View 1 Replies
View Related
Apr 22, 2000
Hi everybody,
There are times when the database (SQL 7.0) cannot be accessed ( backup, routine maintenance, etc....) from asp page.
In those cases i am getting an ugly asp error message.
Is there a way ( code ) which will trap that error and return a nicer custom message for user or something like that.
Thanks a lot,
View 1 Replies
View Related
Jul 20, 2005
Any advice from the crowd? Every time I try to run "Copy DatabaseWizard" I get an error message saying I must be a member of thesysadmin group and have permission to copy files over the network. I'ma local admin on both boxes and a member of the sysadmin group on bothSQL servers and an admin on the network. What am I missing here?Thanks,Ralph NobleJoin Bytes!
View 1 Replies
View Related
Nov 5, 2005
I was hoping someone could tell me what my syntax error is in my code: (this is my first time creating one of these!)
<cfquery name="JobPost"
datasource= "JobPost">
UPDATE Jobs (Position, Description, Requirements)
VALUES ('#Form.Position#', '#Form.Description#' , '#Form.Requirements#')
WHERE JobID=2
</cfquery>
I get the following diagnostic error in the browser:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
SQL = "UPDATE Jobs (Position, Description, Requirements) VALUES ('Updated Receptionist', 'description updated You will take phone calls' , 'description updated Must be able to work a phone.') WHERE JobID=2"
Data Source = "JOBPOST"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (129:2) to (130:23) in the template file
View 3 Replies
View Related
Aug 29, 2006
Ok so I'm using the Management Studio Express and was able to log in and get into the database server, but I had to click the "options>>" button and change database I wanted to connect to from <<default>> to my database on the server or else I get the "cannot open user database, login failed" error message.Then I right click my database and it gives me the "Cannot open user database. Login failed" error message, even though I already connected to the database to login during the connect screen. Also I'm able to interact with the database using SQL QUERIES in the Management Studio, like adding new tables with it, but if I right click the database and click "add table" I get that error.What gives? I know I have permission since I was able to log on, and modify the database using SQL queries but if use the GUI I can't use it. I can't even right-click select "properties" without getting that error. The reason I want to use the GUI is because I want to right click and use the backup feature of the database.My guess is that Management Studio continues to point to the default database(which gives me that message) after I already logged in, so I have no idea how to change the default database that management studio points to, to the one I do have permission to use. Thanks in advance.
View 1 Replies
View Related
Feb 11, 2005
I've got code that on my own machine (visual studio .net 2003 and iis and sql server all exist on this box) works great. I display my test page, which loads a dropdownlist on page_load. This works great on my own machine.
When I move the code to our dev environment. Web server and database servers on separate boxes. I get the error "Object reference not set to an instance of an object" when i try to open the connection to the database. I thought it had to do with permissions and I check all through sql server and everything looks great. I then thought it was the connection string. I still haven't ruled this out, but I wrote a quick vbscript app to attach to the database and try to pull a record. The vbscript worked fine. So, the code works fine on my computer, but not on the web server. The connection does work with vbscript, but through my asp.net web app I get the "object reference" error.
All code below...
ASP.NET webpage:
private void Page_Load(object sender, System.EventArgs e)
{
if( !IsPostBack )
{
// Create a command object for the query
string mySelectQuery = "select id from vw_abcd order by ID";
SqlCommand myCommand = new SqlCommand(mySelectQuery,sqlConnection1);
sqlConnection1.Open();
DropDownList1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
DropDownList1.DataBind();
sqlConnection1.Close();
RangeValidator1.MinimumValue = "1";
RangeValidator1.MaximumValue = DropDownList1.Items.Count.ToString();
}
}
Connection string on my machine:
workstation id=wXXXXXX01;packet size=4096;user id=testuser;password=testpass;integrated security=SSPI;data source=wXXXXXX01;persist security info=False;initial catalog=TestDB"/>
Connection string on web server:
network library=DBMSSOCN;data source=xxx.xx.xxx.xxxinstance1;user id=testuser;password=testpass;initial catalog=TestDB
vbscript:
Dim connConnection, rstresultset
strConnectionString = "driver={Sql Server};server=xxx.xx.xxx.xxxinstance1;user id=testuser;password=testpass;database=TestDB"
Set connConnection = CreateObject("ADODB.Connection")
connConnection.Open strConnectionString
Set rstresultset = createobject("ADODB.Recordset")
rstresultset.ActiveConnection = connConnection
rstresultset.Open "select id, comment from testtable", connConnection
msgbox rstresultset(0)
msgbox rstresultset.Fields(0).Value
Error message and stack trace:
Object reference not set to an instance of an object.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at Web2.Drilldown.Page_Load(object sender, System.EventArgs e)
Any ideas what's going on?????
View 1 Replies
View Related
May 16, 2008
Hi to all!
When I want to execute my package as a job in a SQL Server 2005, I get this Message:
Executed as user: EDAsvcSQLServerPMS. ....00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 09:46:00 Error: 2008-05-16 09:46:01.41 Code: 0xC0048020 Source: Data Flow Task Data Flow Task (DTS.Pipeline) Description: The version of component "Excel Source" (1) is not compatible with this version of the DataFlow. End Error Error: 2008-05-16 09:46:01.54 Code: 0xC0048020 Source: Data Flow Task DTS.Pipeline Description: The version of component "Excel Source" (1) is not compatible with this version of the DataFlow. End Error Error: 2008-05-16 09:46:01.54 Code: 0xC0048021 Source: Data Flow Task Excel Source [1] Description: The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "Excel Source;Microsoft Corporation;Microsoft SqlServer v9; (C) 2005 Microsoft Corporation; All Rights Reserved; http://ww... The package execution fa... The step failed.
The package works fine on the developed server but when I try it out on our integration server it won't go through without these errors. The protection level is set on DontSaveSensitiv and allready I had an error less.
I hope someone can help me, because I can't find anything with google.
Thanx!
Regards,
swisskiwigirl
View 6 Replies
View Related
Apr 25, 2007
Iam trying to backup my database but nothing is backedup and no error message is displayed. Here is my code.
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Net.Mail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Try
Dim con As SqlConnection
con = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|safetydata.mdf;Integrated Security=True;User Instance=True")
Dim com As New SqlCommand("BACKUP DATABASE safetydata TO c:ackuptest")
com.Connection = con
com.Connection.Open()
com.ExecuteNonQuery()
com.Connection.Close()
Response.Redirect("DeveloperBackup_success.aspx")
Catch ex As Exception
Response.Redirect("~Developerackup_error.aspx")
End Try
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>BackUP Page</title>
View 3 Replies
View Related
May 8, 2007
I am having difficulty restoring a database (DB_1) with 2 datafiles and one log file, DB Structure is as following:
Filegroup PRIMARY with file name 'fnm_data' with physical file name and location D:dbfile_1.mdf,
Filegroup 'FG1' with file name 'fgnm1_data1' with physical file name and location F:dbfile_FG1.mdf,
One log file with file name 'fnm_log' with physical file name and location (E:loglog_db.ldf)
{Note} Logfile resides on E drive whereas Datafiles reside on several other drives.
I need to restore the DB on another machine. And I need to move the log file to a drive other than E.In this case it is K drive. Hence I have used the following code,
restore log DB_1 from disk='M:kupccciclog.txt'
WITH RESTRICTED_USER , MOVE 'fnm_log'
TO 'K:DBlog_db.ldf', recovery, replace,RESTART
go
When I try to restore from backup files, I keep error message saying "Physical file name E:loglog_db.ldf may be incorrect." 'fnm_log' cannot be restored. Use Move command to identify a valid location for the file.
Even though I am using Move command to move the log file.
Then I found that if I create a drive with E: and a folder named 'log' then restore program runs alright. That is, when E:log exists then code does run smoothly. All the restore code is looking for the presence of path of the log file from where it is been backed up. In this case it is E:log folder. Once the database is restored I could kill that directory and nothing happens. Also log file has been restored on K:DB only.
Why the restore code is looking for the initial drive letter and path even though I have used Move command? Is there an issue in my code?
Any help will be highly appreciated.
View 3 Replies
View Related
Mar 20, 2008
I installed SQL 2005 including backward compatibility, MSDN libraries and SP2 a new Windows 2003 server (chose mixed mode authentication). Installation was successful and I then installed an off the shelf database with Windows authentication which also installed successfully.
I created a new group in AD, added the database users into the group and gave db-owner rights to the group in SQL as advised by the installation guide. However, when I try to open the database it gives an error message saying "Cannot open database.[DBNETLIB][ConnectionOpen(Connect()).] SQL server does not exist or access denied". I also tested it adding an individual user (myself) as a user to no avail.
When I set up DSN in ODBC on my computer I can successfully test the connection but can't run the application. The connection is via TCP/IP.
Any suggestions?
View 7 Replies
View Related
Jun 12, 2008
Hi, I am seeking a hopefully easy solution to spit back an error message when a user receives no results from a SQL server db with no results. My code looks like this What is in bold is the relevant subroutine for this problem I'm having. Partial Class collegedb_Default Inherits System.Web.UI.Page Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click SqlDataSource1.SelectCommand = "SELECT * FROM [college_db] WHERE [name] like '%" & textbox1.Text & "%'" SqlDataSource1.DataBind() If (SqlDataSource1 = System.DBNull) Then no_match.Text = "Your search returned no results, try looking manually." End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load SqlDataSource1.SelectCommand = "SELECT * FROM [college_db] ORDER BY [name]" SqlDataSource1.DataBind() End Sub Protected Sub reset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles reset.Click SqlDataSource1.SelectCommand = "SELECT * FROM [college_db] ORDER BY [name]" SqlDataSource1.DataBind() End SubEnd Class I'm probably doing this completely wrong, I'm a .net newb. Any help would be appreciated. Basically I have GridView spitting out info from a db upon Page Load, but i also have a search bar above that. The search function works, but when it returns nothing, I want an error message to be displayed. I have a label setup called "no_match" but I'm getting compiler errors. Also, next to the submit button, I also have another button (Protected sub reset) that I was hoping to be able to return all results back on the page, similar to if a user is just loading the page fresh. I'd think that my logic would be OK, by just repeating the source code from page_load, but that doens't work.The button just does nothing. One final question, unrelated. After I set this default.aspx page up, sorting by number on the bottom of gridview, ie. 1,2,3,4, etc, worked fine. But now that paging feature, as long with the sorting headers, don't work! I do notice on the status bar in the browser, that I receive an error that says, "error on page...and it referers to javascript:_doPostBack('GridView1, etc etc)...I have no clue why this happened. Any help would be appreciated, thanks!
View 2 Replies
View Related
Sep 7, 2007
Hi -
I have an File System Task that copies a file from one directory ot another. When I hard code the target directory (c:dirfile.txt) it works fine. When I change it to a virtual directory (\serverdirfile.txt) I get a security error:
[File System Task] Error: An error occurred with the following error message: "Access to the path '\gracehbtest oS2TMM_Live_Title_000002.xml' is denied.".
Where do I change the security settings?
Thanks - Grace
View 5 Replies
View Related
Aug 18, 2006
I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:
[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".
The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:
<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>
There is only 1 ESDU root element and only 1 package element.
Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<xsl:template name="identity" match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Its 5th line is the first xsl:template element.
What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.
Thanks!
View 5 Replies
View Related
Apr 16, 2008
Hello,
My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type.
The dropdown options on the form will be as follows:
ComplimentsComplaintsGeneral CommentsSuggestions
Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item.
For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter.
However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated.
If you need more information, I will provide whatever is needed.
As always, thanks for everyone's assistance.
Chris
View 3 Replies
View Related
Apr 25, 2008
I'm using SQL server on godaddy.com, and for the life of me, tried all freakin day yesterday to get a form to send data to my table, and can't get it to work for the life of me
I think the asp form sends the information to the asp page that is to add the information to the tables correctly, but am not entirely sure, so here is the code for the form:
<html>
<head>
<title>Form Entry</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body><form method="post" action="add.asp">
<table>
<tr>
<td>CustomerID:</td>
<td><input name="CustID"></td>
</tr><tr>
<td>Company Name:</td>
<td><input name="Company"></td>
</tr><tr>
<td>Contact Name:</td>
<td><input name="Contact"></td>
</tr><tr>
<td>Address1:</td>
<td><input name="Address1"></td>
</tr><tr>
<td>Address2:</td>
<td><input name="Address2"></td>
</tr><tr>
<td>Address3:</td>
<td><input name="Address3"></td>
</tr><tr>
<td>City:</td>
<td><input name="City"></td>
</tr><tr>
<td>State:</td>
<td><input name="State"></td>
</tr><tr>
<td>Zip:</td>
<td><input name="Zip"></td>
</tr>
<td>Email:</td>
<td><input name="Email"></td>
</tr><tr>
<td>Phone:</td>
<td><input name="Phone"></td>
</tr>
</table>
<br /><br />
<input type="submit" value="Add New">
<input type="reset" value="Cancel">
</form>
</body>
</html>
Now for the page that is giving me the problem (I think). I'm pretty sure I'm fudging up the connectivity somewhere because all I get is an http 500 error every time I try to upload the information.
Why won't it bloody connect?!?!
Also, is the DIM function on this page used to hide important information? If you guys can help me fix this, I'd be incredibly, incredibly greatful, I'm frustrated out of my mind!
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>piece of shit page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = "whsql-v22.prod.mesa1.secureserver.net"
db_name = "Fulfillment"
db_username = "Fulfillment"
db_userpassword = "your_password"
tablename = "KSEP_Customers"
connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"sql="INSERT INTO customers (CustID,companyname,"
sql=sql & "contactname,address,city,postalcode,country)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("CustID") & "',"
sql=sql & "'" & Request.Form("Company") & "',"
sql=sql & "'" & Request.Form("Contact") & "',"
sql=sql & "'" & Request.Form("Address1") & "',"
sql=sql & "'" & Request.Form("Address2") & "',"
sql=sql & "'" & Request.Form("Address3") & "',"
sql=sql & "'" & Request.Form("City") & "',"
sql=sql & "'" & Request.Form("State") & "',"
sql=sql & "'" & Request.Form("Zip") & "',"
sql=sql & "'" & Request.Form("Email") & "',"
sql=sql & "'" & Request.Form("Phone") & "')"on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
View 4 Replies
View Related
Feb 9, 2007
I've made a form and now all I want to do is save everything in the form into a new database file but I don't know how. I'm using Visual Web Developer 2005. Somehow I'm guessing that I have to set something somewhere so when the submit button is hit, it knows to save it to a database file which doesn't exist yet so it would have to create it. It should be easy but I can't figure it out.
View 1 Replies
View Related
Apr 10, 2007
Hi all,
I'm trying to do an extremely simple task here: add information from a signup form into an SQL database. Sadly, I can't figure out how to get the values into the DB.
Here's my form:
<form id="form1" runat="server"> <div> <asp:Label ID="lblName" runat="server" Text="Your Name:"></asp:Label> <br /> <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator><br /> <asp:Label ID="lblEmail" runat="server" Text="Your Email Address:"></asp:Label> <br /> <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="RegularExpressionValidator" ValidationExpression="w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*"></asp:RegularExpressionValidator><br /> <br /> <asp:Label ID="lblSubscribe" runat="server" AssociatedControlID="radSubscribe" Text="Subscribe"></asp:Label> <asp:RadioButton ID="radSubscribe" runat="server" Checked="True" /><br /> <br /> <asp:Label ID="lblUnsubscribe" runat="server" AssociatedControlID="radUnsubscribe" Text="Unsubscribe"></asp:Label> <asp:RadioButton ID="radUnsubscribe" runat="server" /><br /> <br /> <asp:Button ID="btnSignup" runat="server" Text="Signup" OnClick="btnSignup_Click" /></div> </form>
View 1 Replies
View Related
Feb 3, 2004
I have a registration form, and upon the user clicking the submit button, I want the information to be processed and sent to my SQL database. Each textbox (i.e. username, password, email address) has a corresponding field in a table in the database.
How can I accomplish this? I under stand that I will need an onclick event handler.
View 1 Replies
View Related
Dec 7, 2005
Old Frontpage user here... I need to submit a form to a database, like in Frontpage and store the database on the web server.
How do I accomplish this with Visual Studio Express...is there a ASP.NET component or do I need to code it?
Many Thanks,
Jake
p.s. my ASP.NET 2.0 books are coming for Christmas!
View 1 Replies
View Related
Nov 15, 2007
Very basic question here but I need to add a form to a page so it adds content, its as simple as that. I've done this kind of using a <asp.Formview> tag and it works, but becuase I think I've used a form view I have to click add to insert data first. Should I be using the <asp:formview> tag or is it a problem with the templates?
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ContentID" DataSourceID="ObjectDataSource1"> <InsertItemTemplate> Resource :<asp:DropDownList ID="ResourceIDTextBox" runat="server" Text='<%# Bind("ResourceID") %>' DataSourceID="ObjectDataSource2" DataTextField="Resource" DataValueField="ResourceID"> </asp:DropDownList><br /> Headline: <asp:TextBox ID="HeadlineTextBox" runat="server" Text='<%# Bind("Headline") %>' Width="451px"></asp:TextBox><br /> Date: <asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>'> </asp:TextBox><br /> Body: <FTB:FreeTextBox id="FreeTextBox1" runat="Server" Text='<%# Bind("Body") %>' Width="542px" /> <br /> ImageURL: <asp:TextBox ID="ImageURLTextBox" runat="server" Text='<%# Bind("ImageURL") %>'> </asp:TextBox><br /> OpeningPara: <asp:TextBox ID="OpeningParaTextBox" runat="server" Text='<%# Bind("OpeningPara") %>'> </asp:TextBox><br /> Ret: <asp:TextBox ID="RetTextBox" runat="server" Text='<%# Bind("Ret") %>'> </asp:TextBox><br /> Man: <asp:TextBox ID="ManTextBox" runat="server" Text='<%# Bind("Man") %>'> </asp:TextBox><br /> Pro: <asp:TextBox ID="ProTextBox" runat="server" Text='<%# Bind("Pro") %>'> </asp:TextBox><br /> Com: <asp:TextBox ID="ComTextBox" runat="server" Text='<%# Bind("Com") %>'> </asp:TextBox><br /> IndustryID: <asp:TextBox ID="IndustryIDTextBox" runat="server" Text='<%# Bind("IndustryID") %>'> </asp:TextBox><br /> ContentTitle: <asp:TextBox ID="ContentTitleTextBox" runat="server" Text='<%# Bind("ContentTitle") %>'> </asp:TextBox><br /> Status: <asp:TextBox ID="StatusTextBox" runat="server" Text='<%# Bind("Status") %>'> </asp:TextBox><br /> Pub: <asp:TextBox ID="PubTextBox" runat="server" Text='<%# Bind("Pub") %>'> </asp:TextBox><br /> Fin: <asp:TextBox ID="FinTextBox" runat="server" Text='<%# Bind("Fin") %>'> </asp:TextBox><br /> <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert"> </asp:LinkButton> <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"> </asp:LinkButton> </InsertItemTemplate> <ItemTemplate> <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="Click here to Add New Content"> </asp:LinkButton> </ItemTemplate> </asp:FormView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="ContentADDMethod" TypeName="DataSet2TableAdapters.ContentADDAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ContentID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="ResourceID" Type="Int32" /> <asp:Parameter Name="Headline" Type="String" /> <asp:Parameter Name="Date" Type="String" /> <asp:Parameter Name="Body" Type="String" /> <asp:Parameter Name="ImageURL" Type="String" /> <asp:Parameter Name="OpeningPara" Type="String" /> <asp:Parameter Name="Ret" Type="String" /> <asp:Parameter Name="Man" Type="String" /> <asp:Parameter Name="Pro" Type="String" /> <asp:Parameter Name="Com" Type="String" /> <asp:Parameter Name="IndustryID" Type="Int32" /> <asp:Parameter Name="ContentTitle" Type="String" /> <asp:Parameter Name="Status" Type="String" /> <asp:Parameter Name="Pub" Type="String" /> <asp:Parameter Name="Fin" Type="String" /> <asp:Parameter Name="Original_ContentID" Type="Int32" /> <asp:Parameter Name="ContentID" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="ResourceID" Type="Int32" /> <asp:Parameter Name="Headline" Type="String" /> <asp:Parameter Name="Date" Type="String" /> <asp:Parameter Name="Body" Type="String" /> <asp:Parameter Name="ImageURL" Type="String" /> <asp:Parameter Name="OpeningPara" Type="String" /> <asp:Parameter Name="Ret" Type="String" /> <asp:Parameter Name="Man" Type="String" /> <asp:Parameter Name="Pro" Type="String" /> <asp:Parameter Name="Com" Type="String" /> <asp:Parameter Name="IndustryID" Type="Int32" /> <asp:Parameter Name="ContentTitle" Type="String" /> <asp:Parameter Name="Status" Type="String" /> <asp:Parameter Name="Pub" Type="String" /> <asp:Parameter Name="Fin" Type="String" /> </InsertParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DataSet2TableAdapters.ResourcesTableAdapter"> <InsertParameters> <asp:Parameter Name="Resource" Type="String" /> </InsertParameters> </asp:ObjectDataSource>
View 1 Replies
View Related
Feb 21, 2008
Hi,
I'm not very asp.net savy and could not find any solid examples of what I need done. I have one text box on my page and one submit button. I would like the information entered from the text box to go into a SQL database when clicking on the submit button. I'm not sure what the exact coding should be in order to get this operating the way I want. I'm coding in VB, this is what I have so far:<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title>Untitled Page</title>
<script language="javascript" type="text/javascript">
// <!CDATA[function Submit1_onclick() {
}
// ]]></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Text1" type="text" /><br />
<input id="Submit1" type="submit" value="submit" onclick="return Submit1_onclick()" /></div></form>
</body>
</html>
Thanks,
Derek
View 1 Replies
View Related
May 1, 2006
Hi !
I am creating a website with a form that users can fill up the
information. This form is about the school's information of the users.
After fill up this form, the users will have to click the submit button
that will submit the form to be saved in a database.
I have created the database for that form. My question is how can I
save the result of this form to my database. Let's say I have 5
textboxes in that form, name, school's name, school's address, major,
and comments.
thanks a lot in advanced!
View 3 Replies
View Related
Aug 1, 2001
Hi,
My problem is I only can put the database table to another database.I use example to ********. For example. My database name is Career. The user has a database name called Online. The Online has already some tables in the database they created before. I just need load my database career tables to the Online database. My database career has seven tables. These tables has a reltionship for each other. I just need to load these table to the Online database, But don't build relation to the tables that already exist in the Online database.
Besides, I want to know how load the stored procedure from my database to another database.
View 1 Replies
View Related
Oct 20, 2007
Hi, I am new to ASP.NET and Visual Web Developer 2005 Express, which I run on Windows Vista. I am currently going through some of the tutorial videos on http://www.asp.net/learn/videos/ . I encountered an error in Lesson 04 and I would have ignored it but it keeps haunting me and now I cannot proceed with the lesson 09 all because of the same error. I would really appreciate it if somebody could help me resolve this because it.
General error text
The database filename can not contain the following 3 characters: [ (open square brace), ] (close square brace) and ' (single quote)
Lesson 4 circumstances
Web.Configis modified to contain the following code just before the closing </system.web> tag:<anonymousIdentification enabled="true"/><profile enabled="true"> <properties> <add name="MyNewProperty" allowAnonymous="true"/> </properties></profile>
View 2 Replies
View Related