what is option explicit? what is the use of it?
Answer Posted / rajendra
In VB script
option explicit forces the user to declare every variable
used in the code.
In VB Script is not mandatory to declare the variables.
VB script will be processed by windows scripthost.
Some time script host maynot haddle the undiclared
variables.
so it is a good practice option explicit on the top of the
script code.
once if u declare "option explicit" the each any every
variable must be dicalred before using it in code.
other wise it fires an error nad not allow to run the
script on Windows script host.
It is good coding practice to use "option explicit" on the
top of the code.
byeee
Rajendra Prasad Reddy
rajendra_penumalli@yahoo.com
+919885162742
hyderabad
india
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
Can you list some technologies that support qtp?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
Have you done batch testing in qtp? If yes how you are doing?
Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...
How to test login module with different username and password by using data driven testing in QTP?
Whats the realtime QTP testing process
How qtp recognizes the object?
We stored into the objects OR and then write the scripting
How many types of parameters are there?
Hi, How Accessibility checkpoint in QTP can be implemented in the test script?
How do you send email with attachment from outlook using qtp ?
Hi Sudhananda, plz send me the QTP framework with any diagram and PPTS . I want to switch to automatio, I done QTP from professional person, but he does not give me his knowledge properly. so pls help me Thaks send me on following address mirajkar.akash@gmail.com