Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jirib
Starting Member
5 Posts |
Posted - 2005-06-03 : 09:48:05
|
| guys i found out how to show my stored procedures in a grid in Visual Basic already... but those Stored procedures already have values... and i want to get the parameters from the user to execute the stored procedure....CREATE PROCEDURE sp_procedimiento @Sucursal varchar(3), @deposito varchar(3)ASselect tablsucu.CodSuc,tabldepo.CodDep, tablsucu.desSucfrom tablsucu,tabldepo,tablrutawhere tablsucu.codsuc = @Sucursaland tabldepo.coddep = @depositoand tablsucu.codsuc = tabldepo.codsucand tabldepo.coddep = tablruta.coddepGOheres my Stored procedure and i want from Visual Basic receive of the user the values of @Sucursal and @depositoif anyone can help with that Thx |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-03 : 10:03:46
|
| con.Execute("sp_procedimiento 'param1','param2'")where con is the connection objectMadhivananFailing to plan is Planning to fail |
 |
|
|
Jirib
Starting Member
5 Posts |
Posted - 2005-06-03 : 10:24:50
|
Still dont work like that it says that the @rute is not defined or something like that....this is the code i have in VBCn.Execute ("sp_prueba155 '000002','01010102'")Rs.Open "sp_prueba155", strConex, adOpenStatic, adLockReadOnlyand this is the error it gives to me... it says in english like this... the Procedure precise a parameter '@rute' is not specified or something like that... im a noob at english tho |
 |
|
|
Jirib
Starting Member
5 Posts |
Posted - 2005-06-03 : 11:08:57
|
| ok now all i did is Cn.Execute ("exec sp_prueba155 '000002','01010102'")Rs.Open ("exec sp_prueba155 '000002','01010102'"), strConex, adOpenStatic, adLockReadOnly and it worked.... dunno still why i have to make exec in .execute and also .open weird huh |
 |
|
|
|
|
|
|
|