Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Testing Tools > Automation Testing > WinRunner

WinRunner WinRunner Interview Questions, Learn by sharing WinRunner Interview Questions asked in various companies, Get Career advices, Interview Procedures from WinRunner experts, Post asked WinRunner Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2008, 01:33 PM
Senior Member
 
Join Date: Feb 2008
Posts: 9,095
Default How do you create parameterize

How do you create parameterize SQL commands?
Reply With Quote
  #2 (permalink)  
Old 08-01-2008, 08:44 AM
Junior Member
 
Join Date: Aug 2008
Posts: 3
Default

Quote:
Originally Posted by Anjali View Post
How do you create parameterize SQL commands?

A parameterized query is a query in which at least one of the fields of the WHERE clause is parameterized, i.e., the value of the field is specified by a question mark symbol ( ? ). For example, the following SQL statement is based on a query on the database in the sample Flight Reservation application:


SELECT Flights.Departure, Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights WHERE (Flights.Departure=?) AND (Flights.Day_Of_Week=?)
Reply With Quote
  #3 (permalink)  
Old 08-01-2008, 08:45 AM
Junior Member
 
Join Date: Aug 2008
Posts: 3
Default

A parameterized query is a query in which at least one of the fields of the WHERE clause is parameterized, i.e., the value of the field is specified by a question mark symbol ( ? ). For example, the following SQL statement is based on a query on the database in the sample Flight Reservation application:


SELECT Flights.Departure, Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights WHERE (Flights.Departure=?) AND (Flights.Day_Of_Week=?)
Reply With Quote
  #4 (permalink)  
Old 09-01-2008, 09:06 AM
Junior Member
 
Join Date: Sep 2008
Posts: 1
Default parameterize Query

Select * from [table_name] where [column_name=@myparameter]


@myparameter is the user defined parameter name.

this parameter should be assigned a value then should be added to the sql command.


advantage of this method is that sql injuction can be avoided...
Reply With Quote
Reply

Tags
interview questions, winrunner

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On