PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Web Service not returning data from database
Web Service not returning data from database
Iniciado por guest, 16,ene. 2009 11:24 - 7 respuestas
Publicado el 16,enero 2009 - 11:24
Hi,
I have deployed the following files
Final_WebService.WDL
Final_WebService.XML , I have configured the IIS properly and the web service is working fine when i return some static value from the web service like the procedure below
PROCEDURE ret()
RETURN "Hello"
but it gives me an error when i use to retrieve data from a table like the procedure below.
______________________________________________
PROCEDURE CheckLogin(b)
user is Clogin_master
ds is Data Source
Deserialize(user,b,psdXML)
MemoryToFile(user,login_master)
HExecuteSQLQuery(ds,"select * from login_master where user_id='"+ user:user_id+"'")
HReadFirst(ds)
IF HFound(ds) THEN
RESULT "True"
ELSE
RESULT "False"
END
_________________________________________________
I have WDL and XML files hosted , do i have to host any other analysis or class files to the soap server. I am receiving this error when i execute the web service
"analysis query/view not initialized". Does the deployment pc requires windev installed on it?? or i am missing something. I have tested the procedure without deoloying and it is working fine.

URGENT!! Please help!!
Regards,
Prolay
Publicado el 16,enero 2009 - 12:16
Sorry,
The code isn't tested as you can see (missing one " in the Fopen), but I hope the idea helps.
Publicado el 16,enero 2009 - 12:17
probably some dll's are missing.
To test webservices i use one text file to log all the possible errors, this is the only way i know to see what is hapening.
wlog is int=Fopen("c:\log_wbserv\log.txt,foCreateIfNotExist)
if not HExecuteSQLQuery(ds,"select * from login_master where user_id='"+ user:user_id+"'") then
fwriteline(wlog,"execsql "+errorinfo())
end
if not HReadFirst(ds) then
fwriteline(wlog,"readfirst "+errorinfo())
end
fclose(wlog)
Publicado el 16,enero 2009 - 12:35
Please help out with this error
execsql OLE DB access error.
Error Number = 170124

Failure opening connection:
Data Source:
OLEDB Provider:
Détail de l'erreur système : Description = Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Source = Provider
Help Context = 1240640
Error Number = -2147217887
Native Error Number = -2147217887
Publicado el 16,enero 2009 - 13:41
Hi,
Data Source: RAHULA-PC
OLEDB Provider: SQLOLEDB
why is the webservice not able to access database? I tried it with other computer's address having the same database and still giving me that error. And how to dynamically allocate the connection string. Because different servers can have different connections to database
Regards,
Prolay
Publicado el 16,enero 2009 - 13:41
Hi Prolay...
I totally agree with Paulo that you should test the return values of your functions... But just by reading your code, I have several things that look strange to me:
1. You are writing
ds is Data Source
But there is no definition of the source that I can see... How is your code supposed to know which DB to connect too if you are not defining it?
2. You are doing
MemoryToFile(user,login_master)
Why? This should be used to fill a file buffer before writing it to a file... And you are instead doing it just before a query on that file
Hope this help
Publicado el 16,enero 2009 - 15:55
Hi,
Problem Solved
The default connection to database was giving this error so i defined my own connection and it was working fine. I think the problem is related to the provider.
and MemoryToFile , I use it to insert data into the database, I know it was not required here!! and ds is temporary data source this is what i read in the tutorial. Am i Wrong??
Regards,
Prolay
Publicado el 28,julio 2017 - 06:28
hi,
i am using windev 21.when i try to execute a system stored procedure in mssql database throu OLEDB it doesn,t work properply .it return an error "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Error Number = -2147217887 (0x80040e21).
how can i fix it