Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfpoledb and binary parameters
Message
From
27/02/2007 13:41:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/02/2007 13:55:30
Alan Krack
Mammography Reporting System
Seattle, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01198862
Message ID:
01199227
Views:
19
>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.

You're right. Looks like a bug in VFPOLEDB.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform