Delphi 7 Webbrowser - select without value [closed] - delphi

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I need help...My problem is:
Page source:
<select name="year" id="year" class="form-control select-inline">
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1193</option>
</select>
In delphi 7, use:
WebBrowser1.OleObject.Document.All.Item('year', 0).value := '1990';
But form site continue in blank...Help me please

TWebBrowser is just a wrapper for the Internet Explorer ActiveX control, so this is really an IE DOM issue, not a Delphi issue.
Try setting the select element's selectedIndex property instead of its value property:
WebBrowser1.OleObject.Document.All.Item('year', 0).selectedIndex := 0;
The value property is what gets transmitted to the server, but only of there is an item selected to begin with.

Related

How to create xml file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I need to make xml file which looks like this:
> <message xmlns="client"
> from="from_user" to="To_user"
> type="chat"><properties
> xmlns="#"http://software""><property><name>assetId</name><value
> type="string">5346879f73322e08db030000</value></property><property><name>status</name><value
> type="string">success</value></property><property><name>long</name><value
> type="double">22.3451</value></property>
> <property><name>lan</name><value type="double">3456</value></property>
> </properties></message>
I don't know how to do it. Could you help me?
Either create it in Notepad or learn XSD and generate it.
Check this
http://www.w3schools.com/xml/default.ASP
and when you are done, learn this:
http://www.w3schools.com/Schema/
you may Create it this way
NSString *str = [NSString stringWithString:#"<message xmlns=\"client\"from=\"from_user\" to=\"To_user\" type=\"chat\"><properties xmlns=\"#\"http://software\"\"><property><name>assetId</name><value type=\"string\">5346879f73322e08db030000</value></property><property><name>status</name><value type=\"string\">success</value></property><property><name>long</name><value type=\"double\">22.3451</value></property> <property><name>lan</name><value type=\"double\">3456</value></property> </properties></message>"];

stored procedure remote call not working [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
i have stored procedure sp_1 in server_A .i am calling this SP from Server_B
the code is:exec Server_A.MyDb.dbo.SP_1 in the body of sp i have complicted logic in the final step I insert result to Table_A.
running sp take 10 minute and return 'command complete successfully' but tabe_A is Empty (must be filled).
i try to execute the body of script it work properly .and tble Fill as expect.
i do'nt know what is wrong...?
i try to execute sp_1 from Another server 'server_c' server_d it work fine.
problem is with server_B
i found the anwser the problem is with Remote Query Timeout set to 600 sec

Cannot perform this operation on a closed dataset: Delphi XE4 error with Firebird 2.5.2

I have following code in Delphi 7 as well as in Delphi XE4. I am migrating my code from Delphi 7 to Delphi XE4. I am dealing with datasets.
My dataset dsABC is declared like following:
TfrmMainForm = class(TForm)
dsABC: TpFIBDataSet;
......
......
end
dsABC is used like following at many places:
1. if (dsABC .Locate('ID', Id, [])) then ---File 1
2. dsABC.Edit ----File 2
I mean to say, wherever it is used, its throwing this above said error in Delphi XE4 but same is working fine in Delphi 7.
But if I write following line before using dataset, it works fine
if not(dsABC.Active) then dsABC.Active := True;
I am forced to write this line in each and every file, and for each and every dataset in Delphi XE4 but I wonder then why its working in Delphi 7. Am I doing right to solve my problem or I need some default setting somewhere to get rid of this problem?
Is dataset in Delphi 7 by default active and inactive in Delphi XE4 and you have to explicitly activate it in Delphi XE4?
I found these links about this problem on stackoverflow, but nothing seems to be relating with my problem:
How do I solve the "Cannot perform this operation on a closed dataset" with Borland Database Engine and a Delphi application?
Cannot perform this operation on a closed dataset
Given you've previously posted problems with connecting to the database (which would render any datasets left active at design time inactive) I would say that this is the root of your problem and highlights the problem with relying on datasets being activated in this manner in your code.
There are some properties in TpFibDatabase for Designsupport:
DesignDBOptions -> ddoStoreConnected maybe these are set for delphi7 as default and not in Xe4
Dataset was getting close because my transaction timeout was set to 1000 i,e one seconds. That's why dataset was getting closed after every second. I set timeout to zero to get rid of this problem.

I want to Remove all the controls from the "Detail Band", which is a control of "Quick Report" in DELPHI [duplicate]

This question already exists:
Closed 10 years ago.
Possible Duplicate:
Remove/ Destroy all the control from quick report detail band
Some user say this is #"incomplete question" #, but is a very clear question. I want to Remove all the controls from the "Detail Band", which is a control of "Quick Report" in DELPHI.
I guess something like this would work...
for i := DetailBand.ControlCount - 1 downto 0 do
DetailBand.Controls[0].Free;
But I wrote it from memory... Not sure if QR*** components are TControl descendants.

Nodejs in-memory storage [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
How do I store data to be used for all the clients in my server? (like the messages of a chat)
The server that node.js allows you to build, is an application server, which means that state is preserved, between request, on the server side. The following snippet demonstrates this:
var sys = require('sys'),
http = require('http');
var number = 0;
http.createServer(function (req, res) {
console.log(req.method, req.url);
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('<h1>Number is: ' + number + '</h1>');
res.end();
number++;
}).listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/');
node-cache package is currently the best for key value store and it allows synchronous as well as async storage/retrieval/deletion of keys.
npm link
If you want more features have a look at redis-node-client
Or use a native node storage mechanism (written in node.js)
http://github.com/felixge/node-dirty

Resources