Hi,
I receive the following error while i am trying to run the stored procedure from NAV 4.0. The stored procedure in SQL alone is executing fine.
Microsoft Business Solutions-Navision
This message is for C/AL programmers:
The call to member Execute failed. Microsoft OLE DB Provider for ODBC Drivers returned the following message:
[Microsoft][ODBC SQL Server Driver]Timeout expired
OK
Please let me know the solution.
Sorry, but your post has insufficient information to provide a solid response. Immediate questions:
-
Name of the stored procedure?
-
Does it accept to require input parameters? If yes, did you use the same input parameters
when running it directly as would have been passed by the NAV UI or process?
- Did you run the stored procedure at the same time of day such that the overall workload
in the database was approximately the same between the two test scenarios?
-The name of the stored procedure is InputSP
-It doesn’t accept any input parameters
-it works on SQL server while I execute the procedure. But if i am trying to run the same through NAV then its giving the error.
this is the code i am using in NAV:
//–>Start
CREATE(SQLConnGATL);
CREATE(SQLRecGATL);
SQLSP := ‘[InsertSP]’;
SQLConnGATL.ConnectionString:=‘Driver={SQl Server};Server=ServerName;Database=DBName;’;
SQLConnGATL.Open();
SQLRecGATL:=SQLConnGATL.Execute(SQLSP);
SQLConnGATL.Close();
//–> End
This is perhaps a stupid question, but did you specify the server name and database name?
ya i did specify them properly…