<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>12 Jan 2018 12:40:50 Z</lastBuildDate><pubDate>12 Jan 2018 12:40:50 Z</pubDate><description>Hello,&#13;
&#13;
I have an issue to retrieve he dataset of a stored procedure in WINDEV19.&#13;
The error message says that the "data source is not initialized"&#13;
&#13;
- Connection SLQ SERVER OLEDB: HDescribeConnection(gs_CommonDB_Connection,gs_sql_user,gs_sql_password,gs_server_name,gs_AIGCOMMONDB_Name,hOledbSQLServer,hOReadWrite)&#13;
&#13;
I looked on all forums and tried various samples without success.&#13;
Can someone help ?&#13;
Many thanks in advance.&#13;
&#13;
WINDEV code:&#13;
&#13;
gs_SQLstring = [&#13;
DECLARE @@ret BIGINT ;&#13;
USE [AigCommonDb]&#13;
EXECUTE @@ret=[AigCommonDb].[dbo].[sp_getProfile_Minerva]&#13;
@userName = N'%1'&#13;
]&#13;
&#13;
gs_SQLstring = StringBuild(gs_SQLstring, "vandera")&#13;
&#13;
IF HExecuteSQLQuery(qry_file_CommonDB, gs_CommonDB_Connection, ...&#13;
hQueryWithoutCorrection,gs_SQLstring ) THEN&#13;
IF ErrorOccurred THEN&#13;
Error(HErrorInfo(hErrComplet))&#13;
END&#13;
IF HReadFirst(qry_file_CommonDB) THEN&#13;
Info(qry_file_CommonDB.userProfile)&#13;
END&#13;
ELSE&#13;
Error(HErrorInfo())&#13;
END&#13;
&#13;
&#13;
Error message on HReadFirst:&#13;
&#13;
&#13;
Error at line 30 of Global Procedure Run_Stored_Procedure_AIGCOmmonDB process.&#13;
HReadFirst function called.&#13;
The &lt;qry_file_CommonDB&gt; data source is not initialized.&#13;
- If it is a data file, the file was not found in the &lt;C:\My Projects\BE_MINERVA\BE_MINERVA.wdd&gt; analysis or it was not described by HDeclare/HDeclareExternal.&#13;
- If it is a query or a view, the execution may have failed.&#13;
To retrieve the corresponding error, check the result of HExecuteQuery/HExecuteSQLQuery/HCreateView.&#13;
&#13;
----- Technical Information -----&#13;
&#13;
Project : BE_MINERVA&#13;
&#13;
WL call:&#13;
Process of 'Global Procedure Run_Stored_Procedure_AIGCOmmonDB' (Global_Procedures.Run_Stored_Procedure_AIGCOmmonDB), line 30, thread 0&#13;
'HReadFirst' function, syntax 3&#13;
&#13;
What happened?&#13;
The &lt;qry_file_CommonDB&gt; data source is not initialized.&#13;
- If it is a data file, the file was not found in the &lt;C:\My Projects\BE_MINERVA\BE_MINERVA.wdd&gt; analysis or it was not described by HDeclare/HDeclareExternal.&#13;
- If it is a query or a view, the execution may have failed.&#13;
To retrieve the corresponding error, check the result of HExecuteQuery/HExecuteSQLQuery/HCreateView.&#13;
&#13;
Error code: 70018&#13;
Level: fatal error (EL_FATAL)&#13;
WD55 error code: 18&#13;
&#13;
Dump of the error of 'WD190HF.DLL' module (19.0.97.1).&#13;
Identifier of detailed information (.err): 70116&#13;
Debugging information:&#13;
IEWDHF=1.1&#13;
Module=&lt;WDHF&gt;&#13;
Version=&lt;19.0.97.1&gt;&#13;
Fonction (7,10)&#13;
Additional Information:&#13;
EIT_PATHWDD : &lt;C:\My Projects\BE_MINERVA\BE_MINERVA.wdd&gt;&#13;
EIT_LOGICALTABLENAME : &lt;qry_file_CommonDB&gt;&#13;
EIT_PILEWL :&#13;
Global Procedure Run_Stored_Procedure_AIGCOmmonDB (Global_Procedures.Run_Stored_Procedure_AIGCOmmonDB), line 30&#13;
Selecting the menu of _Menu.Test (WIN_Main._Menu.Test), line 1&#13;
EIT_DATEHEURE : 11/01/2018 10:12:43&#13;
&#13;
Help&#13;
&#13;
- Check that the file is described in the current analysis.&#13;
- For a dynamically described file, check that it has been properly&#13;
declared with HDeclare, HDeclareExternal or HDescribeFile.&#13;
- For a query created in the query editor, or a query written in&#13;
SQL language, check that it has been declared with HExecuteQuery&#13;
or HExecuteSQLQuery.&#13;
&#13;
&#13;
&#13;
&#13;
Stored procedure sp_getProfile_Minerva:&#13;
&#13;
&#13;
USE [AigCommonDb]&#13;
GO&#13;
/****** Object: StoredProcedure [dbo].[sp_getProfile_Minerva] Script Date: 01/11/2018 10:19:54 ******/&#13;
SET ANSI_NULLS ON&#13;
GO&#13;
SET QUOTED_IDENTIFIER ON&#13;
GO&#13;
ALTER PROCEDURE [dbo].[sp_getProfile_Minerva]&#13;
@userName nvarchar(50)&#13;
&#13;
AS&#13;
&#13;
DECLARE @countUserName int;&#13;
DECLARE @DEFAULT_PROFILE nvarchar(50);&#13;
&#13;
SET @DEFAULT_PROFILE = 'RO'&#13;
SET @countUserName = (SELECT count(*) FROM User_Minerva WHERE [UserName] = @userName )&#13;
IF @countUserName = 0&#13;
BEGIN&#13;
INSERT INTO User_Minerva([UserName],[userProfile])&#13;
VALUES(@userName,@DEFAULT_PROFILE)&#13;
END&#13;
&#13;
&#13;
UPDATE User_Minerva&#13;
SET UserLastLogin = getdate()&#13;
WHERE [UserName] = @userName&#13;
&#13;
SELECT [userProfile]&#13;
FROM User_Minerva&#13;
&gt;WHERE [UserName] = @username &#13;
 &#13;
&#13;
 &#13;
&#13;
&#13;
&#13;
Note: The file User_Minerva is declared in the Analysis</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63977-stored-procedure-sql-olebd-problem-get-result-dataset/read.awp</link><title>Stored Procedure SQL OLEBD - Problem to Get result dataset</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
