Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing reports throught the API and powerbuilder.. Switching DBS

Status
Not open for further replies.

JasonHMIS

MIS
Feb 16, 2001
2
US
HI,

I am currently using the api to view reports from our app that we distribute to our customers. The databases are SQLserver7 but I also have the need to change the source to Adaptive server databases as well.

I am having trouble changing the database the report get's it's info from. I am using the following method:


logoninfo li

li.size = 514
li.servername = 'JasonG'
li.databasename = 'H_000'
li.userid = 'dba'
li.password = 'lqs'

if job <> 0 then
rcode = PESetNthTableLogonInfo(job, 0, li, True)
if rcode = 0 then
messagebox(&quot;Error&quot;, &quot;Logon Info Not Set&quot;)
end if
else
messagebox (&quot;Message&quot;, &quot;No Job Opened&quot;)
end if


The returncode = 1

The report however just gets the data from the H_005 database on the server. This is the database the report was designed using. I know I am missing something here and any help pointing me in the right direction would be appreciated.

Thank you
Jason
 
JasonHMIS: Are you calling PELogonServer first before attempting to loop through the Tables collection? David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top