Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory Allocation Failure
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01409566
Message ID:
01409589
Vues:
45
>>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform