Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8577615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:11:59+00:00 2026-06-11T20:11:59+00:00

I am getting logs in the event viewer after each insert. The data gets

  • 0

I am getting logs in the event viewer after each insert.
The data gets inserted, but since it is flooding the event viewer after some time services wont start until I have cleaned the logs.

Here is what i get in the logs:

XY.Archive.SQLClassLibrary.DalException: Problem accessing database. ---> System.Data.SqlClient.SqlException: Incorrect syntax near '_3'.
Unclosed quotation mark after the character string ',308387,null)'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at XY.Archive.SQLClassLibrary.SQLDataAccessLogic.ExecuteCommand(String sqlString)
   --- End of inner exception stack trace ---
   at XY.Archive.SQLClassLibrary.SQLDataAccessLogic.ExecuteCommand(String sqlString)
   at XY.Archive.ServerEngine.Server.InsertDocumentIntoDatabase(Document documentOriginal, Int32 archiveID, String tableName)
Sql string: INSERT INTO table (columns) values (bunch of values) select @@Identity

This is how the insert statement is created:

Public Shared Function CreateStringForInsertDocument(ByVal tableName As String, ByVal document As Document, ByVal strArchiveTime As String, ByVal indexFieldNames As String, ByVal indexFieldValues As String) As String
    Dim strInsert As String = "INSERT INTO " & tableName & " (GUID, ContainerID, DocumentStatusID, ArchiveTime, " & indexFieldNames & ") values ('" & document.GUID & "' ," & document.Container.ContainerID & "," & document.DocumentStatusID & ",'" & strArchiveTime & "'," & indexFieldValues & ") select @@Identity"
    Return strInsert
End Function

Does somebody know what could cause the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:12:00+00:00Added an answer on June 11, 2026 at 8:12 pm

    Yes. The cause is you not using parameterised queries. Read up on them with careful attention to the phrase “SQL Injection”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this error in my event logs for a service I put
I'm getting the following message in my users' crash logs: Dyld Error Message: Symbol
I'm getting this error on a magento installation in the server logs and the
Getting ERR_CONNECTION_RESET after more or less 2 minutes of uploading a rather big file
I'm getting into event handling now, and it seems quite confusing to me. See,
I'm getting these warnings in my application, and it takes a long time get
For some reason I cannot get the error logging to work, I'm getting the
I hate to cross post, but I wasn't getting any progress with this on
I am getting the error Exception occurred in NLog ---> System.Data.SqlClient.SqlException: Conversion failed when
I'm having some problems getting an NSString to convert to an NSDate. Here is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.