Incorrect syntax near the keyword 'TO'

-or-

Incorrect syntax near '<PartialDBName>'

-or-

Incorrect syntax near '='

Published: 2010-01-19

 

Last Updated: 2010-07-26

Applies To

Symptom 1

When attempting to Archive your Guard1 Plus SE database using the G1DataMaintenance Wizard or via command line, you receive one of the following errors:

 

 

Where <PartialDBName> is part of the name of your Guard1 Plus SE Application database.

 

The error is followed by “There was an error creating the archive of your Guard1 Plus SE application database.  Check the error log file for details.

 

The Error.log file will contain a list of errors similar to the example below:

 

 

Symptom 2

When attempting to copy a Rule from a child Facility or Group to a parent Client you receive the following error:

 

 

The error may occur multiple times. If you attempt to paste the Rule again you receive "Cannot start more transactions on this session.", which will occur each time you attempt to copy/paste a Location or Rule; the Client application must be restarted to resolve the error.

 

 

Cause

 

 

Resolution

Symptom 1

Rename the Application database to a name that does not contain spaces (e.g. “Guard1Plus”.)

  1. On the SQL Server, close all open programs.
  2. Open SQL Query Analyzer (SQL 2000) or Management Studio (SQL 2005; select File > New > Query with current connection (or press Ctrl+N)).
  3. Type EXEC sp_renamedb ‘CurrentName', 'NewName'
  1. Verify that the target database is “master”.
  2. Click the Execute button.
  3. Close all open windows.
  4. Open Enterprise Manager / Management Studio and verify that your Application database name has changed and contains no spaces.
  5. On the Guard1 Plus SE Server PC, open a Command Window and browse to C:\Program Files\Guard1 Plus SE Server.
  6. Run the following commands to delete and recreate the Data Source:
    1. G1Cfg 201;Supervisor User;SupervisorPassword;Data Source Name
      • Where
        • Supervisor User = the username of an application user with Supervisor rights
        • Supervisor Password = the password of the above Supervisor user
        • Data Source Name = the name of the existing Master data source (if unknown, run G1Cfg 0 to display it)
    2. G1Cfg 200;Supervisor User;SupervisorPassword;Data Source Name;Data Source Type;SQLServer;Database;SQL Server Login;SQL Server Password
      • Where
        • Supervisor User = the username of an application user with Supervisor rights
        • Supervisor Password = the password of the above Supervisor user
        • Data Source Name = the name of the NEW Master data source (the same as the new Application database name)
        • Data Source Type = 1
        • SQL Server = the name of the SQL Server where the database resides
        • Database = the NEW name of the Application database
        • SQL Server Login = SQL Login associated with Guard1 Plus SE (typically ‘guard’)
        • SQL Server Password = the password for the above SQL Login
    3. G1cfg 401;Supervisor User;SupervisorPassword;Data Source
      • Where
        • Supervisor User = the username of an application user with Supervisor rights
        • Supervisor Password = the password of the above Supervisor user
        • Data Source Name = the name of the NEW Master data source (the same as the new Application database name)
  7. Close the Command Window
  8. Open the Guard1 Plus SE Client; it should open without error.
  9. Close the Guard1 Plus SE Client.
  10. Run the G1DataMaintenance Wizard to create the Archive.

 

 

Symptom 2

  You must add a new Rule to the Client and configure the Rule as desired. At this time you cannot copy/paste a Rule from a child Group to a Parent Client in Guard1 Plus SE.

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2013-2016 TimeKeeping Systems, Inc.