thanks, Bob
i'm talking about "synonym" of sql server 2005
that is, a pointer to -almost- any object
this is my implementation
------------ -------------
database X database Y
------------ -------------
s_MyStoredProc - - - - - - - - - - - MyStoredProc
.....
MyLocalStoredPr oc
....
in a simple case, when i invoke this:
cmd.commandText = "MyLocalStoredP roc"
cmd.Parameters. Refresh()
cmd( 1 ) = myPar_1
...
cmd( N ) = myPar_N
(*) where : cmd is an ADODB.Command object
cmd.Parameters. Refresh() retrieves the parameters collection
in this way, i don't have to create each parameter manually
but ( THIS IS MY CONCERN ) when i try to use:
cmd.commandText = "Y.dbo.MyStored Proc" -or- "s_MyStoredProc "
then, method ADO.Command.Par ameters.Refresh ()
can't retrieve parameters
i know i can simply call the stored proc
connecting directly the app to dabatase Y
but, well, i would like to know
why the way i mention don't works
*** all, using classic asp ***
thanks again
i wait response
friendly, KS
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomescri bió en el mensaje
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
keyser soze wrote:
hi
i have a stored proc, pointed by a synonym
I don't know what you mean by "synonym". You appear to be supplying the
name of a procedure to the commandText
i wish to execute it vía:
cmd.commandType = adStoredProc
Please show actual code: adStoredProc is not a valid constant. I know
what you meant to type, but it makes it obvious that your code is not
real and we have to guess what it actually looks like.
cmd.commandText = "s_MyStoredProc "
cmd.parameters. refresh ---to get the collection
Don't. This is a very bad idea to make ADO make a second trip to the
database just to retrieve the parameter definitions. Either build the
collection yourself, or use the stored-procedure-as-connection-method
technique to execute the procedure
the last line, can't retrieve the Parameters[] collection
if i execute the stored proc directly
the Refresh() method works fine
I don't know what you mean by executing it "directly". Provide the code
snippet that allows Refresh(ugh!!) to work.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.