I've done Microsoft SQL server for years.. but just today tried MySql. The question is with vb.net trying to do a save to MySql. The stored proc looks like this.
DROP PROCEDURE IF EXISTS test.spAgency_Save;
create procedure spAgency_Save (IN p_intTblAgencyID INT, IN p_vcAgency varchar(20),IN p_dtmDate datetime, OUT p_Output INT)
begin
if (p_intTblAgencyID = 0) then
insert into tblAgency(vcAgency, dtmDate)
values(p_vcAgency, p_dtmDate);
set p_Output = LAST_INSERT_ID() ;
else
update tblagency
set vcAgency = p_vcAgency
, dtmDate = p_dtmDate
where intTblAgencyID = p_intTblAgencyID;
end if;
end
and when i run something like this.. it does insert the data
call spAgency_Save(0,'Test4','2008-7-28 11:11',@p_Output);
however, when run this from vb.net.. i get the input string was not in the correct format. Any ideas.
.Parameters.AddWithValue("p_intTblAgencyID", SqlDbType.Int).Value = mIntTblAgencyID
.Parameters.AddWithValue("p_vcAgency", SqlDbType.VarChar).Value = mVcAgency
.Parameters.AddWithValue("p_dtmDate", SqlDbType.DateTime).Value = mDtmDate
.Parameters.AddWithValue("@p_Output", SqlDbType.Int)
.Parameters("@p_Output").Direction = ParameterDirection.Output
The value going into mIntTblAgencyID is 0 mvcAgency is Test5 mdtmDate is #7/23/2010 3:20:09 PM# (copy and pasted that out of the debugger in vb.net
any help would be great. thanks shannon