question

KumarSrikanth-3342 avatar image
0 Votes"
KumarSrikanth-3342 asked brtrachMSFT-0711 edited

Executenonquery insert C# error : Not enough storage is available to complete this operation.

I am using below code in .cs page:

sqlInsert = " Insert into TEMP_UserAD (User_GUID, AD_Login, User_Type,Company_Id,Email,Active,Language,Created_By,Created_Date ";
sqlInsertVal = " VALUES ('" + objectGuid + "','" + samaccountname + "','person'," + companyid + ",'" + Email + "',1,'" + language + "','" + createdby + "',getdate() ";



                         sqlInsert = sqlInsert + " ) ";
                         sqlInsertVal = sqlInsertVal + " ) ";


                         sqlInsert = sqlInsert + sqlInsertVal;

                         //dbCommand = _database.GetSqlStringCommand(sqlInsert);
                         //rowAffected = _database.ExecuteNonQuery(dbCommand, dbTransaction);

                         rowAffected = db.ExecuteNonQuery(sqlInsert);
                         db.CommitTransaction();

I am getting above error. Can some one suggest how can i avoid this error.

Thanks,
Srikanth.

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TakahitoIwasa avatar image
0 Votes"
TakahitoIwasa answered

Hi

You have tagged this question with azure-webapps-apis. Is the web server Web Apps? Is the database server Azure SQL Database?

This error occurs when memory usage is high.
First, use the diagnostic function of each service to check if the memory usage is appropriate.

If it is abnormal, consider whether you can reduce the memory usage by reviewing the program or query.

Cases with high memory usage can occur due to various factors, so it may be difficult to give a more specific answer.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.