Click here to Skip to main content
15,920,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: what is the problem with this code Pin
Guffa12-Jul-07 23:42
Guffa12-Jul-07 23:42 
GeneralRe: what is the problem with this code Pin
Vasudevan Deepak Kumar13-Jul-07 0:05
Vasudevan Deepak Kumar13-Jul-07 0:05 
AnswerRe: what is the problem with this code Pin
chiyankrishna13-Jul-07 0:31
chiyankrishna13-Jul-07 0:31 
GeneralRe: what is the problem with this code Pin
Dave Kreskowiak13-Jul-07 2:53
mveDave Kreskowiak13-Jul-07 2:53 
AnswerRe: what is the problem with this code Pin
Guffa13-Jul-07 3:18
Guffa13-Jul-07 3:18 
GeneralRe: what is the problem with this code Pin
Dave Kreskowiak13-Jul-07 3:31
mveDave Kreskowiak13-Jul-07 3:31 
AnswerRe: what is the problem with this code Pin
Paul Conrad13-Jul-07 4:32
professionalPaul Conrad13-Jul-07 4:32 
QuestionWhy can't i catch parameter Pin
boyindie12-Jul-07 23:10
boyindie12-Jul-07 23:10 
Hi
I have the following function for returning a user specific salt using a stored procedure in mySQL

But my code doesn't seem to be returning a value from my OUTput parameter, can anyone see a problem

Cheers

code is

Sub getSalt(ByVal sender As Object, ByVal e As EventArgs)
'Create connection string to pass database, string holds login information to mySQL,
Dim connectionString As String
connectionString = "Server=localhost; uid=;database=ftp1;"

'Builds .net mysql connection and passes connection string into method
Dim connection As New MySqlConnection(connectionString)
'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 = "sp_getSalt"
'ONLY PLACE THIS IF SPROC, sets the command to a SPROC
cmdString.CommandType = CommandType.StoredProcedure
Dim literr As New LiteralControl

Dim param As MySqlParameter
Try

param = cmdString.Parameters.Add("?p_salt", MySqlDbType.VarChar)
cmdString.Parameters("?p_salt").Direction = ParameterDirection.Output

Dim salt As String = cmdString.Parameters("?p_salt").Value
sendData(sender, e, salt)

Catch ex As Exception
literr.Text = ex.Message
MsgBox(ex.Message)

End Try

Procedure is
CREATE DEFINER=`jshort`@`localhost` PROCEDURE `sp_getSalt`(IN p_userName VARCHAR(20), OUT p_salt varchar(500))
BEGIN
SELECT salt INTO p_salt FROM Users WHERE UserName = p_UserName;
END


AnswerRe: Why can't i catch parameter Pin
Guffa12-Jul-07 23:40
Guffa12-Jul-07 23:40 
GeneralRe: Why can't i catch parameter Pin
boyindie12-Jul-07 23:47
boyindie12-Jul-07 23:47 
GeneralRe: Why can't i catch parameter Pin
Dave Kreskowiak13-Jul-07 2:45
mveDave Kreskowiak13-Jul-07 2:45 
GeneralRe: Why can't i catch parameter Pin
boyindie13-Jul-07 2:56
boyindie13-Jul-07 2:56 
GeneralRe: Why can't i catch parameter Pin
boyindie13-Jul-07 3:05
boyindie13-Jul-07 3:05 
GeneralRe: Why can't i catch parameter Pin
Dave Kreskowiak13-Jul-07 5:51
mveDave Kreskowiak13-Jul-07 5:51 
AnswerRe: Why can't i catch parameter Pin
Guffa13-Jul-07 6:03
Guffa13-Jul-07 6:03 
GeneralRe: Why can't i catch parameter Pin
boyindie16-Jul-07 4:33
boyindie16-Jul-07 4:33 
GeneralRe: Why can't i catch parameter Pin
Guffa16-Jul-07 12:15
Guffa16-Jul-07 12:15 
GeneralRe: Why can't i catch parameter Pin
boyindie16-Jul-07 12:18
boyindie16-Jul-07 12:18 
QuestionMy own equalizer Pin
bala_kathir12-Jul-07 21:20
bala_kathir12-Jul-07 21:20 
AnswerRe: My own equalizer Pin
Dave Kreskowiak13-Jul-07 2:41
mveDave Kreskowiak13-Jul-07 2:41 
Questiondisable back and forward button Pin
Ashish Kumar Vyas12-Jul-07 18:49
Ashish Kumar Vyas12-Jul-07 18:49 
AnswerRe: disable back and forward button Pin
Sathesh Sakthivel12-Jul-07 19:18
Sathesh Sakthivel12-Jul-07 19:18 
GeneralRe: disable back and forward button Pin
Dave Kreskowiak13-Jul-07 2:38
mveDave Kreskowiak13-Jul-07 2:38 
AnswerRe: disable back and forward button Pin
RepliCrux12-Jul-07 20:06
RepliCrux12-Jul-07 20:06 
GeneralRe: disable back and forward button Pin
Ashish Kumar Vyas12-Jul-07 23:37
Ashish Kumar Vyas12-Jul-07 23:37 

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.