Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending data to SQL Server 7.0
Message
 
 
À
13/07/2002 14:50:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00678420
Message ID:
00678423
Vues:
12
>Hello Group,
>
>If I want to send a date or a numeric data to a SQL stored procedure do I send it as a date or numeric or do I need to send it as a text type.
>

It depends on how you call SP. Assuming that you're using ODBC connection.
CREATE PROCEDURE proc_test 
	@p1 datetime, @p2 int = 0
AS
	SELECT @p1, @p2

...
ldDt = DATE()
lnInt = 5
* You can call it using parameters
? SqlExec(lnConn, [EXEC proc_test ?ldDt, ?lnInt])
* Or build a string
? SqlExec(lnConn, [EXEC proc_test '] + DTOC(ldDt,1) + [', ] + TRANSFORM(lnInt))
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform