Problem with odbc in the same server

cpina
Member Posts: 52
Hello. ](*,) ](*,) ](*,)
I need inserting Navision data in different database in the same server SQL Server 2000, Navision 4.0
I insert Navision data from two different servers and the process run OK, but when I try insert Navision data in the same server the process is broken, ##Problem with Execute, timeout##
I can read data but I can´t insert data.
SERVER A DB NAVISION - insert -> DB WEB Broken
SERVER B DB Navision (Backup of server A) - insert -> SERVER A DB WEB OK
Could you help my?
Thank´s a lot
CODE
CREATE(connec);
connec.Mode:=3;
connec.Open('Provider=SQLOLEDB;Data Source=A;Initial Catalog=WEB;Password=xxxx;User ID=yyyy');
string:='INSERT INTO dbo.CAB_Demanda_Servicios_Informatica (login,CODIGO_Tipo_Servicio_Informatica,Descripcion) VALUES '+
'('+ '''' + USERID + '''' +',6,'+ '''' + 'Dar de baja a: XXX'+ _recEmployee."Search Name" + ' con fecha: ' +
FORMAT (_recEmployee."Termination Date") + '''' +')';
connec.Execute (string);
connec.Close;
I need inserting Navision data in different database in the same server SQL Server 2000, Navision 4.0
I insert Navision data from two different servers and the process run OK, but when I try insert Navision data in the same server the process is broken, ##Problem with Execute, timeout##
I can read data but I can´t insert data.
SERVER A DB NAVISION - insert -> DB WEB Broken
SERVER B DB Navision (Backup of server A) - insert -> SERVER A DB WEB OK
Could you help my?
Thank´s a lot
CODE
CREATE(connec);
connec.Mode:=3;
connec.Open('Provider=SQLOLEDB;Data Source=A;Initial Catalog=WEB;Password=xxxx;User ID=yyyy');
string:='INSERT INTO dbo.CAB_Demanda_Servicios_Informatica (login,CODIGO_Tipo_Servicio_Informatica,Descripcion) VALUES '+
'('+ '''' + USERID + '''' +',6,'+ '''' + 'Dar de baja a: XXX'+ _recEmployee."Search Name" + ' con fecha: ' +
FORMAT (_recEmployee."Termination Date") + '''' +')';
connec.Execute (string);
connec.Close;
0
Comments
-
I'm thinking this may be a permissions issue. Similar to when using linked tables to interact with another SQL database on the same server. Since NAV uses SQL Application roles, any access to resources not defined in the Application Role are done using the Guest account.
Try this: (It works for me with linked tables)
Activate the Guest acount for the other database, then grant appropriate access rights to the guest account.
Example:Use [Your_Other_DB] Grant Connect to guest GO Grant select, update on dbo.soem_table to guest GO
There are no bugs - only undocumented features.0 -
bbrown is right. Check if the user (here yyyy) has the permissions to insert / update / select / delete records.
You can set the permissions over the SSMS in the contextmenu of the user (Folder Security on the database or on the server).
You can also set the permissions with the grant command that bbrow posted.Do you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions