J
Joe Au
I create a query "GetName" on access as follow:
parameters p_accno text (3), p_accname text(10);
select accname from account where accno=[p_accno];
On Web Form, I have the code
dim acname as string
dim cmd as oledbcommand = new oledbcommand("GetName",oledbconnection1)
cmd.commandtype=commandtype.storedprocedure
cmd.parameter.add(new oledbparameter("paccno",textbox1.text))
cmd.parameter.add(new oledbparameter("paccname",acname))
cmd.parameter.item("paccname").direction=output
cmd.executenonquery()
After that, the acname cannot hold the accname from the database.
Why? Thanks.
parameters p_accno text (3), p_accname text(10);
select accname from account where accno=[p_accno];
On Web Form, I have the code
dim acname as string
dim cmd as oledbcommand = new oledbcommand("GetName",oledbconnection1)
cmd.commandtype=commandtype.storedprocedure
cmd.parameter.add(new oledbparameter("paccno",textbox1.text))
cmd.parameter.add(new oledbparameter("paccname",acname))
cmd.parameter.item("paccname").direction=output
cmd.executenonquery()
After that, the acname cannot hold the accname from the database.
Why? Thanks.