1. mitch hansen
  2. PowerBuilder
  3. Tuesday, 5 February 2019 16:01 PM UTC

 
Hi,

This is a web service question. I can't seem to get a simple web service to connect to a local database using odbc.

software Im using is as follows:

powerbuilder 2019 beta,  sybase anywhere 16,  iis 10,  windows 10.

This is a standard power builder web service ( no c# ).  Everything is running on the same machine.

The database is started manually ( I added asp.net & application pool permissions anyway )
The web service deploys correctly. The client talks to the web service ( i.e. the web service returns the
error message from the connect sqlca statement. )

Ive deployed the runtime package to the \bin directory under my webservice.
Ive deployed the .net runtime to the same \bin directory under my webservice.

Ive made sure the application pool is 32bit.

My connection statement works perfectly from an application but not from a web service.

Can anyone shed some light on this? I dont know what to try next.  Here's my connect statement.

 

//---------------------------------------------------------------------------------------------
// fill out the sqlca object
//---------------------------------------------------------------------------------------------
SQLCA.DBMS = "ODBC"
SQLCA.Database = ""
SQLCA.UserID = "dba"
SQLCA.DBPass = "sql"
SQLCA.LogID = ""
SQLCA.LogPass = ""
SQLCA.ServerName = "local1"
SQLCA.DBParm = "ConnectString='DSN="+"local1"+";UID=dba;PWD=sql;'"
SQLCA.Lock = ""

 

//---------------------------------------------------------------------------------------------
// check the autocommit flag, which is hardcoded to false
//---------------------------------------------------------------------------------------------
//Choose Case Lower ( "false" )
// Case "1", "true", "on", "yes"
// SQLCA.AutoCommit = True
// Case "0", "false", "off", "no"
SQLCA.AutoCommit = False
// Case Else
// SQLCA.AutoCommit = False
//End Choose

 

//---------------------------------------------------------------------------------------------
// try connecting to the database
//---------------------------------------------------------------------------------------------
Connect using SQLCA;


if sqlca.sqlcode <> 0 then
as_errorstring = String(SQLCA.SQLCode) + ", " + sqlca.sqlerrtext + ", " + String(sqlca.sqldbcode)
return sqlca.sqlcode
end if

 

 

thanks

mitch

mitch hansen Accepted Answer Pending Moderation
  1. Tuesday, 5 February 2019 16:30 PM UTC
  2. PowerBuilder
  3. # 1

 

 

Comment
  1. mitch hansen
  2. Tuesday, 5 February 2019 21:51 PM UTC
No, I only mention this because its like the driver is never getting called.

You would think some kind message would be getting logged upon initialization or something.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 5 February 2019 22:18 PM UTC
Anything in the IIS or O/S event logs?
  1. Helpful
  1. mitch hansen
  2. Wednesday, 6 February 2019 17:06 PM UTC
I couldn't find anything relevant in the logs.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 5 February 2019 16:26 PM UTC
  2. PowerBuilder
  3. # 2

Hi Mitch;

  Note: The DSN that your Web Service are trying to use to connect via your web service must be declared as a "System" defined DSN.

HTH

Regards ... Chris

Comment
  1. mitch hansen
  2. Monday, 11 February 2019 17:30 PM UTC
Hi Chris,



heres how I start the server.

dbsrv16 -x TCPIP -n local1 c:\customerdb\mss\vs.db
  1. Helpful
  1. mitch hansen
  2. Monday, 11 February 2019 17:40 PM UTC
If, I can provide you any other details, please let me know.

This is powerbuilder 19 beta, on an amd 64bit windows 10 machine. Everything is on one machine, server, iis, powerbuilder.



Thanks Mitch
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 11 February 2019 20:08 PM UTC
Does your DSN profile in the ODBC Admin Utility connect OK to "Local1"?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.