Re: Error 1829 from a Webservice
- From: Venkatesh Gopal <gopalv@xxxxxxxxxx>
- Date: Thu, 10 Nov 2005 11:37:17 -0600
Hi,
I did try a WebService with IIS 5.1 using Visual Studio 2003 on WinXP. Did
not have any issues at all. Here is a code snippet...
I will try with IIS 6.0 and respond.
[WebMethod]
public string getCustDetail(int custId)
{
string OutString = " ";
string ConnStr =
"Server=ol_ibm_thinkvg;DataBase=stores_demo;User ID=xxx;Password=xxx";
string SqlCmd = "SELECT fname, lname FROM customer
where customer_num=?";
IfxConnection ifxConn = new IfxConnection(ConnStr
);
ifxConn.Open();
IfxCommand selCmd = new IfxCommand(SqlCmd,ifxConn
);
selCmd.Parameters.Add("customer_num",custId);
IfxDataReader dr = selCmd.ExecuteReader();
while(dr.Read())
{
OutString = dr.GetString(0) + " " + dr.
GetString(1);
}
dr.Close();
ifxConn.Close();
return(OutString);
}
Venkatesh.
jparagg@xxxxxxxxx
Sent by: owner-informix-list@xxxxxxxx
11/10/2005 02:40 AM
Please respond to jparagg
To: informix-list@xxxxxxxx
cc:
Subject: Re: Error 1829 from a Webservice
Hello,
Thanks for your reply.
Yes, I forgot to mention I am on IIS 6.0.
By "It fails in webservice" I mean, only the connection.
It is something like
Scenario that fails is :
webservice function
--> calls a DLL function
--> DLL internally connects to db
-->Here before connecting to db, I dumped the environment
variables to a text file (from the DLL itself).
--> The text file shows proper variables and other debug messages
but connection returns -1829
Scenario that works is :
Sample application in delphi.
--> calls (the same) DLL function
--> DLL internally connects to db
--> Dumping the environment variables to the text file (from the
DLL itself).
--> The text file shows proper variables and other debug messages
also the connection returns success and function returns required data
I will try your suggestion to write dummy C# DLL to check whether the
enviornment variables are same...
Thanks and regards
jpar
sending to informix-list
.
- Follow-Ups:
- Re: Error 1829 from a Webservice
- From: jparagg
- Re: Error 1829 from a Webservice
- Prev by Date: Re: UK IUG Meeting
- Next by Date: Re: Sql to concatenate multiple rows to a single row / column
- Previous by thread: Re: Error 1829 from a Webservice
- Next by thread: Re: Error 1829 from a Webservice
- Index(es):
Relevant Pages
|