473,396 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connect Form to Database Insert Code

I am having trouble figuring out to call a database INSERT procedure from a
simple submit form.

It appears I should use the onclick event to trigger the procedure called
[Sub btnInsert_Click] BUT when I do this I receive this error:

'btnInsert_Click' is not a member of 'ASP.Insert_aspx'.

I realise the procedure is houwsed in a [Private] sub which may be what is
causing the problem, but I am stumped on how to connect the form to the .NET
code...

Could someone help me here?
<% @ Import namespace="System.Data.SqlClient" %>
<script runat="server">

'Imports System.Data.SqlClient
Public Class index
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents btnInsert As System.Web.UI.WebControls.Button
Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox
Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox
Protected WithEvents Repeater1 As System.Web.UI.WebControls.Repeater

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Public strConn As String = "data source=xx.xx.xxx.xxx; User ID=xxxxxx;
Password=xxxxxx; Persist Security Info=True;packet size=4096"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
LoadData()
End Sub

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test.maximumasp.com; User
ID=V03testUW; Password=test Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (FirstName,
LastName)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text & "')",
New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maximumasp.com; User ID=test;
Password=testJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From Customers"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>

<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox>
</p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox>
<asp:Button id="Button1" onclick="Button1_Click" runat="server"
Text="Button"></asp:Button>
</p>
</form>
</body>
</html>


Nov 19 '05 #1
7 3615
Jason:
you are trying to hook up the event two ways...

once in the aspx via onClick="Button1_Click"
second via Handles btnInsert.Click in the function name...

you only need one or the other....just remove the onClick="Button1_Click"
from the aspx control and the Handles btnInsert.Click will hook the event..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
I am having trouble figuring out to call a database INSERT procedure from a simple submit form.

It appears I should use the onclick event to trigger the procedure called
[Sub btnInsert_Click] BUT when I do this I receive this error:

'btnInsert_Click' is not a member of 'ASP.Insert_aspx'.

I realise the procedure is houwsed in a [Private] sub which may be what is
causing the problem, but I am stumped on how to connect the form to the ..NET code...

Could someone help me here?
<% @ Import namespace="System.Data.SqlClient" %>
<script runat="server">

'Imports System.Data.SqlClient
Public Class index
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents btnInsert As System.Web.UI.WebControls.Button
Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox
Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox
Protected WithEvents Repeater1 As System.Web.UI.WebControls.Repeater

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Public strConn As String = "data source=xx.xx.xxx.xxx; User ID=xxxxxx;
Password=xxxxxx; Persist Security Info=True;packet size=4096"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
LoadData()
End Sub

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test.maximumasp.com; User
ID=V03testUW; Password=test Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (FirstName,
LastName)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text & "')",
New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maximumasp.com; User ID=test; Password=testJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From Customers"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>

<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox>
</p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
</p>
</form>
</body>
</html>

Nov 19 '05 #2
Hi Karl, No go!

I did as you said and made only one hook up event. That removes the error
and deploys the form. But on submitting the form, nothing happens. The page
does seem to load but data in the text boxes remains after submitting as if
maintaining state and nothing is deposited in the database...........it does
not appear to be calling the sub below. IF it is something else is going
wrong, but no errror is thrown.

- Jason

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test; User ID=V032U10DUW;
Password=ctestJ; Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (ListingBroker,
SellingBroker)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text &
"')", New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maxtestasp.com; User ID=test;
Password=ctestJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From ChangeStatus"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox>
</p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox>
<asp:Button id="btnInsert" onclidk="btnInsert_Click"
runat="server" Text="Button"></asp:Button>
</p>
</form>
</body>
</html>



"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl...
Jason:
you are trying to hook up the event two ways...

once in the aspx via onClick="Button1_Click"
second via Handles btnInsert.Click in the function name...

you only need one or the other....just remove the onClick="Button1_Click"
from the aspx control and the Handles btnInsert.Click will hook the event..
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
I am having trouble figuring out to call a database INSERT procedure from
a
simple submit form.

It appears I should use the onclick event to trigger the procedure

called [Sub btnInsert_Click] BUT when I do this I receive this error:

'btnInsert_Click' is not a member of 'ASP.Insert_aspx'.

I realise the procedure is houwsed in a [Private] sub which may be what is causing the problem, but I am stumped on how to connect the form to the

.NET
code...

Could someone help me here?
<% @ Import namespace="System.Data.SqlClient" %>
<script runat="server">

'Imports System.Data.SqlClient
Public Class index
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents btnInsert As System.Web.UI.WebControls.Button
Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox Protected WithEvents Repeater1 As System.Web.UI.WebControls.Repeater

'NOTE: The following placeholder declaration is required by the Web

Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Public strConn As String = "data source=xx.xx.xxx.xxx; User ID=xxxxxx; Password=xxxxxx; Persist Security Info=True;packet size=4096"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
LoadData()
End Sub

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test.maximumasp.com; User
ID=V03testUW; Password=test Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (FirstName,
LastName)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text & "')", New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maximumasp.com; User

ID=test;
Password=testJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From Customers"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>

<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox>
</p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox>
<asp:Button id="Button1" onclick="Button1_Click"

runat="server"
Text="Button"></asp:Button>
</p>
</form>
</body>
</html>


Nov 19 '05 #3
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
if Not Page.IsPOstBack Then
LoadData()
end if
End Sub

you are reloading the original data on postback thus overwritting whateve
was entered...

Kar

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
Hi Karl, No go!

I did as you said and made only one hook up event. That removes the error
and deploys the form. But on submitting the form, nothing happens. The page does seem to load but data in the text boxes remains after submitting as if maintaining state and nothing is deposited in the database...........it does not appear to be calling the sub below. IF it is something else is going
wrong, but no errror is thrown.

- Jason

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test; User ID=V032U10DUW;
Password=ctestJ; Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (ListingBroker,
SellingBroker)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text &
"')", New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maxtestasp.com; User ID=test; Password=ctestJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From ChangeStatus"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox>
</p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox>
<asp:Button id="btnInsert" onclidk="btnInsert_Click"
runat="server" Text="Button"></asp:Button>
</p>
</form>
</body>
</html>



"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl...
Jason:
you are trying to hook up the event two ways...

once in the aspx via onClick="Button1_Click"
second via Handles btnInsert.Click in the function name...

you only need one or the other....just remove the onClick="Button1_Click"
from the aspx control and the Handles btnInsert.Click will hook the event..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
I am having trouble figuring out to call a database INSERT procedure from
a
simple submit form.

It appears I should use the onclick event to trigger the procedure

called [Sub btnInsert_Click] BUT when I do this I receive this error:

'btnInsert_Click' is not a member of 'ASP.Insert_aspx'.

I realise the procedure is houwsed in a [Private] sub which may be what is
causing the problem, but I am stumped on how to connect the form to
the .NET
code...

Could someone help me here?
<% @ Import namespace="System.Data.SqlClient" %>
<script runat="server">

'Imports System.Data.SqlClient
Public Class index
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents btnInsert As System.Web.UI.WebControls.Button
Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox Protected WithEvents Repeater1 As
System.Web.UI.WebControls.Repeater
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Public strConn As String = "data source=xx.xx.xxx.xxx; User

ID=xxxxxx; Password=xxxxxx; Persist Security Info=True;packet size=4096"

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
LoadData()
End Sub

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=test.maximumasp.com; User
ID=V03testUW; Password=test Persist Security Info=True;packet
size=4096" Dim cmd As New SqlCommand("INSERT INTO ChangeStatus (FirstName,
LastName)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text &

"')", New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub

Sub LoadData()
Dim strConn As String = "data source=test.maximumasp.com; User

ID=test;
Password=testJ; Persist Security Info=True;packet size=4096"
Dim strSQL As String = "Select * From Customers"
Dim cmd As New SqlCommand(strSQL, New SqlConnection(strConn))
cmd.Connection.Open()
Repeater1.DataSource = cmd.ExecuteReader
Repeater1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

End Class' Insert page code here
'

</script>

<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="txtFirstName" runat="server"></asp:TextBox> </p>
<p>
</p>
<p>
<asp:TextBox id="txtLastName" runat="server"></asp:TextBox> <asp:Button id="Button1" onclick="Button1_Click"

runat="server"
Text="Button"></asp:Button>
</p>
</form>
</body>
</html>



Nov 19 '05 #4
Thanks, Karl, but this has seemed to have no impact on the script after I
adjusted the script....the values are not going into the databasse No error
is thrown.

- Jason

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uh****************@TK2MSFTNGP14.phx.gbl...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
if Not Page.IsPOstBack Then
LoadData()
end if
End Sub

you are reloading the original data on postback thus overwritting whateve
was entered...

Nov 19 '05 #5
Can't say I see anyting obvious...have you tried to debug the code?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thanks, Karl, but this has seemed to have no impact on the script after I
adjusted the script....the values are not going into the databasse No error is thrown.

- Jason

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uh****************@TK2MSFTNGP14.phx.gbl...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
if Not Page.IsPOstBack Then
LoadData()
end if
End Sub

you are reloading the original data on postback thus overwritting whateve was entered...


Nov 19 '05 #6
Great Idea - but I am a bit stumped on how to do this, do you mean:

1. Use the Web Matrix debugger...not sure how to activate this....plus,
surely I need an error message prior to using a debugger?

2. Manually debug myself via the code....but not sure where to start as I am
not getting any errors.....?

I did not notice that perhaps the code I am using is redundant...I got this
from a tutorial site...I notice that the connection to the database seems to
be repeated in various sections of the code which I find confusing...surely
it only needs to be connected once in the string and then referred to, yet
the various subs seem to duplicate this.......

- Jason
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Can't say I see anyting obvious...have you tried to debug the code?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thanks, Karl, but this has seemed to have no impact on the script after I
adjusted the script....the values are not going into the databasse No

error
is thrown.

- Jason

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uh****************@TK2MSFTNGP14.phx.gbl...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
if Not Page.IsPOstBack Then
LoadData()
end if
End Sub

you are reloading the original data on postback thus overwritting

whateve was entered...



Nov 19 '05 #7
Ah...WebMatrix doesn't support debugging...sorry, didn't know you were using
this.

As for the connection code, you typically want to recreate a connection and
open it by chunks and don't want to reuse/reopen old connections. If your
coming from classic ASP this might not seem intuitive. In classic ASP you'd
often open a connection early and close it late, in ASP.Net you open late
and close early...this is because of the underlying connection pooling...

Sorry I can't be any more help about the initial problem ....if you simply
the code to it's core (although it's pretty simple as-is) it might help.
You could also turn on page training via Trace="True" in the @Page directive
and adding some Trace.Write("Click_Event") this will atleast tell you if
your hitting the button click event.. By any chance, your button/textboxes
aren't in the repeater, are they?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:OT*************@TK2MSFTNGP15.phx.gbl...
Great Idea - but I am a bit stumped on how to do this, do you mean:

1. Use the Web Matrix debugger...not sure how to activate this....plus,
surely I need an error message prior to using a debugger?

2. Manually debug myself via the code....but not sure where to start as I am not getting any errors.....?

I did not notice that perhaps the code I am using is redundant...I got this from a tutorial site...I notice that the connection to the database seems to be repeated in various sections of the code which I find confusing...surely it only needs to be connected once in the string and then referred to, yet
the various subs seem to duplicate this.......

- Jason
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Can't say I see anyting obvious...have you tried to debug the code?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
<ja***@catamaranco.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thanks, Karl, but this has seemed to have no impact on the script after
I adjusted the script....the values are not going into the databasse No

error
is thrown.

- Jason

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME

net> wrote in message news:uh****************@TK2MSFTNGP14.phx.gbl...
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> if Not Page.IsPOstBack Then
> LoadData()
> end if
> End Sub
>
> you are reloading the original data on postback thus overwritting

whateve
> was entered...



Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: atlasyeo | last post by:
Hi, my first time posting on a newsgroup. anyway, let's cut to the chase. I'm trying to migrate mysql database form one server to another server. So I copied the data from /var/lib/mysql to the...
0
by: Kate Perry | last post by:
I am trying to execute a query on a db2 database using the dbi module. I'm wondering if someone can take a look at my code and tell me what I'm doing wrong. I'm assuming it's a problem with my...
3
by: Lee | last post by:
Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After...
4
by: Wonderinguy | last post by:
Our websphere application uses a generic application userid to connect and query db2 on z/os via DB2 connect. The end user,logs in to the application using his regular userid, which is then...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
6
by: yoyo | last post by:
Mabey I'm missing something very basic, but I can't seem to get it to work. I'm trying to follow along in the sample programs that tells how to do that, but mine still doesn't work. In my...
2
by: BOS | last post by:
Hi there, I just create a form that contains name, Address, City, State, Zip, Question Checked box, and dropdown list selection for the user to fill-out the answer in the texbox, checkbox or...
8
by: BD | last post by:
I am developing C# win form app to work with remote database on SQL Server 2005. Problem scenario is as follows: 1. a form is open that has downloaded dataset to local cache 2. computer is...
3
by: mkhizess | last post by:
Hi Buddzy Can you plz help to connect to Access DataBase input from HTML form using insert statement. I am still new on programming with html here is my code . <html> <head> ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.