Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How can I get an attribute of a DropDownList item using javascript? Pin
kubben26-Jun-07 7:49
kubben26-Jun-07 7:49 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
Martin_26-Jun-07 7:54
Martin_26-Jun-07 7:54 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
Martin_27-Jun-07 3:24
Martin_27-Jun-07 3:24 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
kubben27-Jun-07 3:27
kubben27-Jun-07 3:27 
QuestionSending Data Pin
boyindie26-Jun-07 5:03
boyindie26-Jun-07 5:03 
AnswerRe: Sending Data Pin
Not Active26-Jun-07 5:09
mentorNot Active26-Jun-07 5:09 
AnswerRe: Sending Data Pin
Fred_Smith26-Jun-07 5:18
Fred_Smith26-Jun-07 5:18 
GeneralRe: Sending Data Pin
boyindie26-Jun-07 6:01
boyindie26-Jun-07 6:01 
I have made the necessary changes as you have said above, it jus keeps falling through to the catch statement thoFrown | :(

any more suggestions?

I have debugged and it seems to go thru as expeced also

<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">

Sub page_load()

End Sub

''' <summary>
''' Page_load
''' Recognised by ASP and must be provided on loading of page.
'''
''' Creates connection to database, passes stored procedure into test database
''' and fills a table, which is showing in web browser
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>


Sub sendData(ByVal sender As Object, ByVal e As EventArgs)
Try
'Create connection string to pass database, string holds login information to mySQL,
Dim connectionString As String
connectionString = "Server=localhost; uid=jshort; pwd=oasisarab;database=test;"

'Builds .net mysql connection and passes connection string into method
Dim connection As New MySqlConnection(connectionString)
'Open connection to DB
connection.Open()

'Create mySql command string for passing query or SPROC(Stored Procedure)
Dim cmdString As New MySqlCommand
'Set Command to equal mySql connection,t so can pass SQL query
cmdString.Connection = connection
'Set command string to equal SPROC
cmdString.CommandText = "insertmessage"
'ONLY PLACE THIS IF SPROC, sets the command to a SPROC
cmdString.CommandType = CommandType.StoredProcedure

Dim param As New MySqlParameter


param = cmdString.Parameters.Add("param1", SqlDbType.VarChar, 50)
param.Direction = ParameterDirection.Input
param.Value = txtFirstName.Text

param = cmdString.Parameters.Add("param2", SqlDbType.VarChar, 50)
param.Direction = ParameterDirection.Input
param.Value = txtLastName.Text


cmdString.ExecuteNonQuery()
connection.Close()
Catch
MsgBox("Broken")




End Try



End Sub



</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="vbscript" type="text/vbscript">

</script>
</head>
<body>
<form id="form1" runat="server">

ENTER FIRSTNAME<asp:TextBox runat="server" ID="txtFirstName">
</asp:TextBox><br /><br />
ENTER LAST NAME&nbsp;
<asp:TextBox runat="server" ID="txtLastName"></asp:TextBox>&nbsp;
<asp:Button runat="server" ID="submit" Text="Submit" onclick="sendData" />



</form>
</body>
</html>

GeneralRe: Sending Data Pin
Fred_Smith26-Jun-07 6:09
Fred_Smith26-Jun-07 6:09 
GeneralRe: Sending Data Pin
boyindie26-Jun-07 6:28
boyindie26-Jun-07 6:28 
GeneralRe: Sending Data Pin
Fred_Smith26-Jun-07 6:53
Fred_Smith26-Jun-07 6:53 
QuestionExport & Import Pin
Sinchan Nikam26-Jun-07 4:01
Sinchan Nikam26-Jun-07 4:01 
AnswerRe: Export & Import Pin
Not Active26-Jun-07 5:05
mentorNot Active26-Jun-07 5:05 
Questionauto response of mails. Pin
hkchauhan26-Jun-07 3:40
hkchauhan26-Jun-07 3:40 
AnswerRe: auto response of mails. Pin
Not Active26-Jun-07 5:01
mentorNot Active26-Jun-07 5:01 
AnswerRe: auto response of mails. Pin
Venkatesh Mookkan26-Jun-07 18:16
Venkatesh Mookkan26-Jun-07 18:16 
Questionform EncType=&quot;Multipart/Form-Data&quot; Pin
Brendan Vogt26-Jun-07 3:31
Brendan Vogt26-Jun-07 3:31 
AnswerRe: form EncType=&quot;Multipart/Form-Data&quot; Pin
Viral Upadhyay26-Jun-07 3:45
Viral Upadhyay26-Jun-07 3:45 
QuestionSQL Query in Multi-line TextBox in Web form Pin
Blumen26-Jun-07 3:28
Blumen26-Jun-07 3:28 
AnswerRe: SQL Query in Multi-line TextBox in Web form Pin
Viral Upadhyay26-Jun-07 3:41
Viral Upadhyay26-Jun-07 3:41 
GeneralRe: SQL Query in Multi-line TextBox in Web form Pin
Blumen26-Jun-07 19:11
Blumen26-Jun-07 19:11 
GeneralRe: SQL Query in Multi-line TextBox in Web form Pin
Viral Upadhyay26-Jun-07 20:30
Viral Upadhyay26-Jun-07 20:30 
Questionregular expression Pin
ritu432126-Jun-07 2:54
ritu432126-Jun-07 2:54 
AnswerRe: regular expression Pin
Brendan Vogt26-Jun-07 3:36
Brendan Vogt26-Jun-07 3:36 
GeneralRe: regular expression Pin
martin_hughes26-Jun-07 4:31
martin_hughes26-Jun-07 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.