Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfpoledb and binary parameters
Message
De
27/02/2007 18:49:03
Alan Krack
Mammography Reporting System
Seattle, Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01198862
Message ID:
01199381
Vues:
18
I've changed it to various types and have even removed the type. It doesn't seem to matter at all.


>No sure at all, never worked with VFPOLEDB, and I know that putting a type after a variable didn't stops you to pass whatever parameter you want, but I am curious what happens if you change the declaration of the last parameter from :
>tSignature as Image to tSignature as BLOB (or varbinary)?
>
>
>>Here is the section where the parameters that are sent to the stored procedures are set up.
>>
>>....
>>.Parameters.Add(myDataBaseProvider.CreateParameter("@tRespDate", _response))
>>.Parameters.Add(myDataBaseProvider.CreateParameter("@tXML", _xML))
>>.Parameters.Add(myDataBaseProvider.CreateParameter("@tSignature", IIf(buffer Is Nothing, DBNull.Value, buffer), DbType.Binary))
>>
>>The third parameter is an image that's been converted to a binary stream. At this point the value of "buffer" is correct and contains the binary data. This is sent to a VFP store parameter that creates a new record and saves the data. This signature field in the VFP table is a blob field that accepts null values.
>>
>>The stored procedure looks like this:
>>
>>PROCEDURE AddRespArch
>>LPARAMETERS theNewID AS INTEGER, ;
>>			tPatID AS INTEGER, ;
>>			tRespDate AS DATETIME, ;
>>			tXml as String, ;
>>			tSignature as Image
>>			
>>LOCAL newresparchid AS INTEGER
>>
>>NewID('RespArch','iresparchid',1,@newresparchid)
>>	
>>	INSERT INTO RespArch ;
>>		( ;
>>		iresparchid, ;
>>		ipatientid, ;
>>		tresponse, ;
>>		xml, ;
>>		bsignature ;
>>		) ;
>>	VALUES ;
>>		( ;
>>		newresparchid, ;
>>		tPatID, ;
>>		tRespDate, ;
>>		tXml, ;
>>		tSignature ;
>>		)
>>	theNewID = newresparchid
>>	RETURN GetNewIDResSet(theNewID)
>>ENDPROC
>>
>>
>>
>>If the value of tSignature is tested immediately after the LPARAMETERS statement, it always NULL, the other values are correct.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform