Jump to content


Photo

Program Error after converting to SQL database


  • This topic is locked This topic is locked
2 replies to this topic

#1 Oleg Donchuk

Oleg Donchuk

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 07 September 2010 - 08:32 AM

Hi,

I have successfully transferred data from Native to SQL database, except one table: I believe it was "QueueID" or something like that. Now after I start AccuTrack I'm getting the following error:

"OLE IDispatch exception code 0 from Microsoft SQL Native Client: Cannot find the object "QUEUE" because it doe not exist or you do not have permissions..."

AccuTrack seems working fine, but I'm afraid later when we need the Queue it won't be there for us and the error is annoying. Could you walk me through on how to create the table manually in SQL? Or may be you have some other ideas that could help me to resolve this issue. Deleting SQL database and Transferring the data again did not help - the same table won't get imported to SQL server.

Thank you,
Oleg Donchuk
MVCC, Utica, NY

#2 Mon

Mon

    Administrator

  • Admin
  • PipPipPip
  • 2,612 posts
  • Gender:Male
  • Location:Orlando, FL

Posted 08 September 2010 - 12:54 PM

There was a new column called QUEUE that was added to one of the tables. AccuSQL is silently trying to add this column to your SQL Server database but is failing because you are connecting to the SQL Server with an account that cannot alter table schemas (for example, a public AccuTrack account).

The error is harmless and you can continue to work if you ignore it.

To prevent that error you can do this:


  • On SQL Server machine using SQL Server Management Studio log on with Windows authentication or with "sa" account.
  • Locate AccuTrack database and right click and select 'New Query'
  • Paste the following code and execute
----- Start of code -----

IF NOT Exists ( select *

from sys.columns

where Name = N'QueueID'

and Object_ID = Object_ID(N'Queue') )

BEGIN

ALTER TABLE [dbo].[QUEUE]

ADD [QueueID] [varchar](38) NOT NULL

CONSTRAINT [DF__QUEUE__QueueID] DEFAULT ( '' )



CREATE NONCLUSTERED INDEX [QueueID] ON [dbo].[QUEUE] ( [QueueID] ASC )

WITH (

PAD_INDEX = OFF,

STATISTICS_NORECOMPUTE = OFF,

SORT_IN_TEMPDB = OFF,

IGNORE_DUP_KEY = OFF,

DROP_EXISTING = OFF,

ONLINE = OFF,

ALLOW_ROW_LOCKS = ON,

ALLOW_PAGE_LOCKS = ON)

ON [PRIMARY]

END

-- End of code -----




If you have a SQL DBA you can tell him to run the above script on accutrack database and he would know what to do.




Alternatively you can do the following if you know the "sa" password or Windows authentication enabled on server:





  • Temporarily set database location with 'SA' account or Windows Auth. In accuSQL
  • Exit AccuSQL and restart. It should come up with no error this time.
  • Go to database location and set the account back to previous limited account.

Mon Nasser
AccuTrack Manager
mon@accutrack.org
(888)249-7227
http://www.accutrack.org

#3 Oleg Donchuk

Oleg Donchuk

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 08 September 2010 - 01:34 PM

Thank you!
Worked as instructed!
Oleg




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users