Results 1 to 5 of 5
  1. #1
    AshleyWells is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Location
    Leicester
    Posts
    2

    "Invalid Argument" error editing / updating data with Access front end and SQL Server


    Im getting the error "Invalid Argument" suddenly with some of my tables in SQl Server 2008. Im using Access as my front end but when i open the table within Access cetain records error when trying to make a change. There are around 22,000 records in the table but it only seems to happen on about half a dozen. I've checked primary keys etc but that's not causing it. I have tried editing the data in the table, using an update query to change the data and used the CurrentDB.Execute code but they all error. I have deleted the table and re-created it but still no joy. Can anyone help?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are you linking to a table, or to a view?
    if it's a view, are there calculated values in that view and if so are any of the expressions potentially a problem? (i.e. dividing by zero, or performing a date function on a text field)

    Can you identify which records are causing the problem and go to the table to see what's actually been stored? have you examined the records in your SQL tables for non-visible ascii (for example) characters (like line feed, carriage return)?

  3. #3
    tanvi is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    100
    There are various reasons behind this error. Some common reasons are database corruption & database size limit. Please check this article for more information: http://data-base-recovery.blogspot.c...ror-in-ms.html

  4. #4
    AshleyWells is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Location
    Leicester
    Posts
    2
    Im linking to the table from an Access front end and it has no relationships to other tables.
    I have managed to find out which of the fields im having an issue with and written some code to strip out any non alphanumeric charaters (as it's a text field) but that didnt solve it either. The field is an nvarchar(255) and the text that was entered into the records that are causing this issue are 255 charaters long. I wasnt sure if that was causing the problem so i limited the length of text available to enter into the field to 200 and it seems to have solved the it.
    Does SQL server need to add any hidden characters to text fields or anything like that?

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    yes there's likely an end of line character but you can strip those out with the trim([string]) function, but if you're linking to the table directly you would have to run an append or update query rather than a link which is probably not the greatest solution to your problem

Please reply to this thread with any new information or opinions.

Similar Threads

  1. table field name "Year" causing Argument Not Optional
    By JosmithTwo in forum Programming
    Replies: 2
    Last Post: 09-26-2012, 08:01 PM
  2. Replies: 13
    Last Post: 12-05-2011, 05:10 AM
  3. Replies: 2
    Last Post: 11-04-2011, 02:45 AM
  4. StrComp causing "Invalid use of Null" error
    By sephiroth2906 in forum Programming
    Replies: 5
    Last Post: 09-15-2011, 07:06 PM
  5. error "OLE Server isn't registered"
    By newtoAccess in forum Forms
    Replies: 1
    Last Post: 12-26-2010, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums