Skip to Content
avatar image
Former Member

User Account Control on Windows 7 affecting Auto-Increment in SQL Anywhere

I am using SQL Anywhere 12 on a Windows 7 system where the User Account Control is affecting access to my database which resides in a folder under ProgramData.  I set the User Account Control to the lowest level and am running under a Administrator User account but the database does not autoincrement a key field.  The code works fine on my XP system, but I want to upgrade to Windows 7, but I need to "fix" the problem before making the move.  Any help would greatly be appreciated.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 08, 2015 at 07:43 AM


    I would not fix the problem by lowering to lowest level.

    How about checking the AccessControlList of the directory where the database is located in and add the missing users with appropriate access write?

    Did you already check this?

    kind regards


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I'm not using an SAP product.  I'm using Sybase SQL Anywhere 12.0.1 in my custom application in C#.  SAP bought Sybase back in 2010.

  • Mar 17, 2015 at 05:08 PM

    Hi Barry,

    I've moved this topic to the SQL Anywhere SCN Community.


    User Account Control (UAC) should not have a specific effect on the ability to insert records and data into the SQL Anywhere database.

    The database file is accessed through a database server process, and you connect to the database server, not the database file. Access to the database server is only limited by a username and password, and once logged in, there are associated database permissions.

    UAC is only used to regulate access to files and the ability to change things on an operating system level.

    Can you still connect to the database server when UAC is enabled? If so, then your issue will not likely be related to UAC.

    but the database does not autoincrement a key field.

    Are you seeing an error when initially inserting? Once you insert data, are you committing your transaction? How have you determined currently that the "database does not autoincrement a key field"?


    Jeff Albion

    SAP Active Global Support

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jeff Albion

      Yes, it is a regular C# .Net 3.5 program.  Basically, the program is creating a ticket and "TicketNumber" is a BIGINT field and it is auto-increment.  When the record is inserted, it should increment the ticket #, but it doesn't (on Win7) when I  run my code that was compiled on the XP system..  The program works fine in Windows XP.   It also works fine on the Windows 7 system if I compile the code on that system.  Incidentally, the compiled code from the windows 7 system works both with UAC turned fully on or fully low.  I'm using Visual Studio 2008 for the compiler..

      The record in the database has the same ticket number after every insert and the rest of the ticket data is the last data entered (meaning that the previous data is overwritten with the new data).

      I would agree that it seems that it would be related to the application environment, but there is no difference other than running code compiled on the XP system vs.running the same exact code compiled on the Win7.system.