BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

newbie on webbroker don't grasp it

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
Alfred ten Hoeve
Guest





PostPosted: Thu Dec 25, 2003 1:54 am    Post subject: newbie on webbroker don't grasp it Reply with quote



Hi,

I ry to modify an example from Marco Canu a bit.
The example is called CustQueP, from Mastering delphi 6, chapter 22, page
970.
Made it a CGI-app. Works perfect.
Now I try to let it work with Interbase 6.0.1.6. The pageProducer refuse to
fill the comboboxes.
I tried with BDE (TDatabase) and dbExpress; both give the same problem.

I use delphi 6 Pro, WinXP Pro, IIS 5.1.

Thanks for your help.

Alfred.


Back to top
damian marquez
Guest





PostPosted: Thu Dec 25, 2003 5:43 pm    Post subject: Re: newbie on webbroker don't grasp it Reply with quote



"Alfred ten Hoeve" <nospam (AT) nospam (DOT) nl> wrote

Quote:
Now I try to let it work with Interbase 6.0.1.6. The pageProducer refuse
to
fill the comboboxes.
I tried with BDE (TDatabase) and dbExpress; both give the same problem.

I use IBX to connect to IB. However show us please a piece of your code to
see what's going on.



Back to top
Alfred ten Hoeve
Guest





PostPosted: Thu Dec 25, 2003 9:41 pm    Post subject: Re: newbie on webbroker don't grasp it Reply with quote



I have a WebModule (CGI) with a TPageproducer and a TQuery.

The HTML for the Pageproducer is here:

<h4>Customer QueryProducer Search Form</h4>
<form action="<#script>/search" method="POST">
<table>
<tr><td>State:</td><td><select name="State">
<#State>
</select>
</td></tr>
<tr><td>Country:</td><td><select name="Country">
<option> </option>
<#Country>
</select>
</td></tr>
<tr><td></td><td><center><input type="Submit"></center></td></tr>
</table></form>

And here is the Pageproducer's OnHTMLTag-event:

procedure TWebModule1.PageProducer1HTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
begin
if TagString = 'script' then
ReplaceText := Request.InternalScriptName
else
begin
ReplaceText := '';
Query2.SQL.Clear;
Query2.SQL.Add ('select distinct ' +
TagString + ' from customer');
try
Query2.Open;
try
Query2.First;
while not Query2.EOF do
begin
ReplaceText := ReplaceText +
'<option>' + Query2.Fields[0].AsString +
'</option>'#13;
Query2.Next;
end;
finally
Query2.Close;
end;
except
ReplaceText := '{wrong field: ' + TagString + '}';
end;
end;
end;


If I link the Query to DBDemos, all works fine.

If I link the Query, via a TDatabase, to Mastsql.gdb in the "Borland
SharedData" directory it don't. I get the form, but the comboboxes are not
filled with data.
The same when I use dbExpress to get the info out of Mastsql.gdb.

Even if I don't use a Pageproducer, but write all HTML in code, same result.
So what is going wrong? I don't grasp it.

TIA,
Alfred.


Back to top
chrisC
Guest





PostPosted: Fri Dec 26, 2003 12:40 am    Post subject: Re: newbie on webbroker don't grasp it Reply with quote

I presume you have an active Transaction in your IB?

Chris

"Alfred ten Hoeve" <nospam (AT) nospam (DOT) nl> wrote

Quote:
I have a WebModule (CGI) with a TPageproducer and a TQuery.

The HTML for the Pageproducer is here:

h4>Customer QueryProducer Search Form</h4
form action="<#script>/search" method="POST"
table
tr><td>State:</td><td><select name="State"
#State
/select
/td></tr
tr><td>Country:</td><td><select name="Country"
option> </option
#Country
/select
/td></tr
tr><td></td><td><center><input type="Submit"></center></td></tr
/table></form

And here is the Pageproducer's OnHTMLTag-event:

procedure TWebModule1.PageProducer1HTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
begin
if TagString = 'script' then
ReplaceText := Request.InternalScriptName
else
begin
ReplaceText := '';
Query2.SQL.Clear;
Query2.SQL.Add ('select distinct ' +
TagString + ' from customer');
try
Query2.Open;
try
Query2.First;
while not Query2.EOF do
begin
ReplaceText := ReplaceText +
' '</option>'#13;
Query2.Next;
end;
finally
Query2.Close;
end;
except
ReplaceText := '{wrong field: ' + TagString + '}';
end;
end;
end;


If I link the Query to DBDemos, all works fine.

If I link the Query, via a TDatabase, to Mastsql.gdb in the "Borland
SharedData" directory it don't. I get the form, but the comboboxes are
not
filled with data.
The same when I use dbExpress to get the info out of Mastsql.gdb.

Even if I don't use a Pageproducer, but write all HTML in code, same
result.
So what is going wrong? I don't grasp it.

TIA,
Alfred.





Back to top
Alfred ten Hoeve
Guest





PostPosted: Fri Dec 26, 2003 2:22 am    Post subject: Re: newbie on webbroker don't grasp it Reply with quote

"chrisC" <chris (AT) awesomesoft (DOT) com> schreef in bericht
news:3feb838e$1 (AT) newsgroups (DOT) borland.com...
Quote:
I presume you have an active Transaction in your IB?

Chris

Sure.


BTW if I don't use the PageProducer and put all the (HTML)code in an
ActionHandler (still using the IB-query), the effect is the same. If I write
the Response.Content-string to a file (say Test.htm) and open the file in IE
the form is OK.

Alfred.



Back to top
chrisC
Guest





PostPosted: Fri Dec 26, 2003 5:56 am    Post subject: Re: newbie on webbroker don't grasp it Reply with quote

BTW, is the IB database path fully qualified. ie say
someComputerName:c:somePathsomeDatabaseName.gdb?
Can't think why you couldn't get your SQL Query data unless your SQL
statement is not qualified correctly?

Chris

"Alfred ten Hoeve" <nospam (AT) nospam (DOT) nl> wrote

Quote:
"chrisC" <chris (AT) awesomesoft (DOT) com> schreef in bericht
news:3feb838e$1 (AT) newsgroups (DOT) borland.com...
I presume you have an active Transaction in your IB?

Chris

Sure.

BTW if I don't use the PageProducer and put all the (HTML)code in an
ActionHandler (still using the IB-query), the effect is the same. If I
write
the Response.Content-string to a file (say Test.htm) and open the file in
IE
the form is OK.

Alfred.





Back to top
Alfred ten Hoeve
Guest





PostPosted: Fri Dec 26, 2003 1:25 pm    Post subject: Re: newbie on webbroker don't grasp it Reply with quote

"chrisC" <chris (AT) awesomesoft (DOT) com> schreef in bericht
news:3febcda1$1 (AT) newsgroups (DOT) borland.com...
Quote:
BTW, is the IB database path fully qualified. ie say
someComputerName:c:somePathsomeDatabaseName.gdb?
Can't think why you couldn't get your SQL Query data unless your SQL
statement is not qualified correctly?

Chris

Thanks Chris,

I had the database and IB-Server on the same disk as IIS, so I thought that
a local path (without ComputerName) was sufficient. Now I learned that the
connectionstring must contain the servername as well.

Problem solved.

Alfred.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.