Ask a Question related to ASP.NET General, Design and Development.
-
Paul #1
Command Parameters
Can someone tell me why the following code does not work ?
It does not crash or cause errors and it creates a new row in the table
"tblusers" but the fields are NULL.
Sub doInsert()
'Create Insert string
Dim MySQL As String = "Insert into tblusers (USERTEXT) values (@Pnotes)"
'Set up connection to mysql database
Dim myConn As OdbcConnection = New
OdbcConnection("driver={MySql};uid=root;pwd=;serve r=127.0.0.1;database=dbnrg
plc;OPTION=17923")
Dim Cmd As New OdbcCommand(MySQL, myConn)
Cmd.Parameters.Add(New OdbcParameter("@Pnotes", Me.txtNotes.Text))
myConn.Open()
Cmd.ExecuteNonQuery()
myConn.Close()
End Sub
Thanks in Advance
Paul Guest
-
get command line parameters in plugin (i.e. argc & argv)
hi, i'm searching in the api documentation how to get parameters passed to acrobat when i call c:\acrobat\acrobat.exe ___mypdf.pdf -C ashjs7... -
using Command to set Parameters and Recordset to retrive the Query
Hi guys, withou using SP, I want to be able to add a Parameter to the SQL Query and retrive the Recordset so I can use the Paging property under... -
SPs/Command Object/Parameters Problem
I've searched through google groups and cannot find an answer to this: My application passes values from a form to a page that requests them and... -
Projector with command line parameters
Hello, is it possible to build a projector, which can be started with command line parameters? If yes, how can I get access to this parameters... -
Passing parameters to a Perl Script from Command Line (Linux)
Hi, I'm fairly new to both programming in shell script (linux) and in programming in perl. I need to pass a parameter to the perl script from... -
S. Justin Gengo #2
Re: Command Parameters
Paul,
Run the debugger and see if the text box actually has a value in it.
My guess is that your code is clearing the text box on post back.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Paul" <paul@themedialounge.com> wrote in message
news:udxTRUCXDHA.888@TK2MSFTNGP10.phx.gbl...(@Pnotes)"> Can someone tell me why the following code does not work ?
>
> It does not crash or cause errors and it creates a new row in the table
> "tblusers" but the fields are NULL.
>
> Sub doInsert()
> 'Create Insert string
> Dim MySQL As String = "Insert into tblusers (USERTEXT) valuesOdbcConnection("driver={MySql};uid=root;pwd=;serve r=127.0.0.1;database=dbnrg> 'Set up connection to mysql database
> Dim myConn As OdbcConnection = New
>> plc;OPTION=17923")
> Dim Cmd As New OdbcCommand(MySQL, myConn)
> Cmd.Parameters.Add(New OdbcParameter("@Pnotes", Me.txtNotes.Text))
> myConn.Open()
> Cmd.ExecuteNonQuery()
> myConn.Close()
> End Sub
>
> Thanks in Advance
>
>
S. Justin Gengo Guest



Reply With Quote

