For a webbased application:-
what should be code in expert veiw, for retrieving a
single column name "username" from a server and checking
whether exported "username" from datatable doesn't exist in
server.
suppose i have saved in excelsheet a username="gayatri" ,
which is exported, then checked for whether this
username "gayatri" exist in server database or not ? if
exist then allow to enter new username, which should be
again checked for in loop , or else come out of loop and
enter a distinct "username".
plz let me have this answer in my id
gayatrisahooin@hotmail.com
Answer / Pallavi Singh
To achieve this, you can use VBScript, ASP, and SQL to create a web application. Here's an example of how the code might look like:
```vbnet
Dim connStr, cmdStr, rs, username
Set conn = CreateObject("ADODB.Connection")
conn.Open "Your_Server_Connection_String"
username = Request.QueryString("username") ' Get the username from the request
set rs = CreateObject("ADODB.Recordset")
rs.Open "SELECT username FROM UsersTable", conn
Do While Not rs.EOF ' Loop until we find a unique username
If rs!username = username Then ' Check if the username already exists in the database
Response.Write "Username already exists, please enter a different one."
Exit Do ' Exit the loop and end the script
End If
rs.MoveNext ' Move to the next record
Loop
rs.Close ' Close the recordset
conn.Close ' Close the connection"
' Save the username in an Excel file for further processing if needed
' ...
"
Send email with code to gayatrisahooin@hotmail.com
| Is This Answer Correct ? | 0 Yes | 0 No |
How to capture a runtime error in vbscript?
What are class properties?
Mention what is the difference between vbscript and vba?
how does vb script help in web page designing? explain with example.
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
What is the extension of the vbscript file?
How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?
what types of bugs will we find out in banking projects for automation testing?
1 Answers Napier Healthcare, TCS,
we executed QTP scripts in one browser(i.e IN)same scripts is working on another browsers or not (i.e mean netscap,m azol..like )
how to write basic programs in VB Script like addition, multiplication?
Explain about tristate constants in vbscript?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?