Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Stored Procedure Compatibility
Message
 
 
À
03/07/2001 07:15:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00526199
Message ID:
00526215
Vues:
16
Hi!

Just a guess: problem could went away if you will use the SQL Server statement instead of ADCMDSTOREDPROC. 'Execute ...' works well with SQL Server, don't remember exactly with Oracle...

You can also check the oCommand.Parameters.Count value before appending parameters. If count already there, just assign values, otherwise - append parameters.

HTH.

>I am currently facing a strange problem...
>
>Check out this code...
>
>
>
>	oConnection = CreateObject("adodb.connection")
>	with oConnection
>		.Provider = "MSDAORA"
>		.ConnectionString = "Persist Security Info=False;Password=quest;User ID=quest;Data Source=TJM"
>		.Open
>	endwith
>	
>	oCommand = CreateObject("adodb.command")
>	with oCommand
>		.ActiveConnection =  oConnection
>		.commandtext = "GetStatus"
>		.CommandType = ADCMDSTOREDPROC
>		.Parameters.append(.CreateParameter("RETURN_VALUE",3,4,0))
>		.Parameters.append(.CreateParameter('p_mainkey',adVarchar,adParamInput,10,'0000000046'))
>		.Parameters.append(.CreateParameter('p_module',adInteger,adParamInput,1,1))
>		.Execute
>	endwith
>	
>	?oCommand.Parameters(0).Value
>
>
>
>The strange part is that as soon as I execute this code I get to the lines..
>.CommandType = ADCMDSTOREDPROC
>
>As soon as I do this the parameters are appended to the command automatically after a split second delay. So after the parameter appends I have 6 parameters...
>
>This only happens on Oracle but not SQL Server. I don't mind it but I need
>it to work in a consistant way if possible...
>
>Anyone know how to disable this? I find it strange since the
>parameters.refresh doesn't work?!?!
>
>
>The other problem is oracle does not like the parameters with names like
>@p_mainkey is there a different syntax I can use on SQL Server because it SUCKS
>having to hardcode two methods for each server...
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform