Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Allocation Failure
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01409566
Message ID:
01409591
Views:
55
>>>>>In foxpro, we get error ["ODBC SQL Server Driver] Memory allocation failure" when making a connection to SQL Server 2005.
>>>>>
>>>>>We only get this error when we pass a text file which is (171 MB) to a parameter of data type (TEXT)
>>>>>
>>>>>If the text file is smaller then we dont have a problem.
>>>>>
>>>>>Our SQL Server 2005 is on WIN Server 2003.
>>>>
>>>>Do you have the same error if you use varbinary(max) type instead of the text?
>>>>
>>>>Also, may be you can save the files zipped?
>>>
>>>
>>>With varbinary(max) we get error ["Operand type clash: text is incompatible with varbinary"] .
>>>
>>
>>Can you post some code (your VFP code) so I will just try this here if I find huge file?
>>
>>>Yes,we have tried passing a zip file but no luck on that either , error is still ["Memory allocation failure" ]
>
>
>*------------------------------------------------------------
>Function SaveImage( l_ImagePath )
>*------------------------------------------------------------
>	
>	---l_ImagePath  = 'textFile.txt' use a file > 170 MB
>		
>	lcName = JUSTFNAME(l_ImagePath)  
>	lcType = JUSTEXT(l_ImagePath)	 
>
>	lcImage= FILETOSTR( l_ImagePath )
>
>	lcSqlCmd = [exec dbo.sproc_SaveImage ']    	+ lcName                          + [','] + ;
>				                        lcType + [', ?lcImage, ]
>
>
>	RetVal = SQLEXEC(this.ConNo, lcSqlCmd ,'tempFL') 
>	IF RetVal < 0
>				
>		private laError
>		=AERROR(laError)		
>			
>		this.RetMsg = laError(2)	--"Memory Allocation Failure"	
>	endif
>
>ENDFUNC
>
To use varbinary(max) did you try STRCONV(filetostr(l_ImagePath),13) && or 15 (not sure which one you need to try here).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform