| | |
SQL statement to query user input??
Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2005
Posts: 11
Reputation:
Solved Threads: 0
Hi GUys
Just wondering if any one can help me out. Basically i wnat to create an SQL query which will take the input of the user and query that specific variable:
e.g the user enetrs in a field, the value entered is assigned to variable "srch", then in my SQL query i want whatever has been entered to be pattern matched to the data stored in the database, would the query possibale be something like this:
SELECT functionme FROM MsgeTble WHERE alternme LIKE "*$srch*"
Im pretty novice in databases
Please any suggestions would be grateful! Thanks
Just wondering if any one can help me out. Basically i wnat to create an SQL query which will take the input of the user and query that specific variable:
e.g the user enetrs in a field, the value entered is assigned to variable "srch", then in my SQL query i want whatever has been entered to be pattern matched to the data stored in the database, would the query possibale be something like this:
SELECT functionme FROM MsgeTble WHERE alternme LIKE "*$srch*"
Im pretty novice in databases
Please any suggestions would be grateful! Thanks
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Solved Threads: 0
Hey ppl,
I also have the same problem, but I usually dont have as much time to log on here. If anybody does have the answer, plz email me at husseinmohamedali@gmail.com. Thanks
I also have the same problem, but I usually dont have as much time to log on here. If anybody does have the answer, plz email me at husseinmohamedali@gmail.com. Thanks
•
•
Join Date: Mar 2007
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
Hi GUys
Just wondering if any one can help me out. Basically i wnat to create an SQL query which will take the input of the user and query that specific variable:
e.g the user enetrs in a field, the value entered is assigned to variable "srch", then in my SQL query i want whatever has been entered to be pattern matched to the data stored in the database, would the query possibale be something like this:
SELECT functionme FROM MsgeTble WHERE alternme LIKE "*$srch*"
Im pretty novice in databases![]()
Please any suggestions would be grateful! Thanks
HI...
There is 2 ways.
i) u can write in the Qurey
just u have to enter in the last field like this : [Enter the Name]
and in Criteria: u have the write the filed name
like:
[Enter the Name]
Field Name
ii) u can write in the code
set db = currentdb
set rec = db.oprecordset("Select * from MsgeTble WHERE ename = " & text1.value & "")
if not(rec.bof and rec.eof) then
rec.movefirst
while not rec.eof
text1.value = rec.field("aaa")
rec.movenext
wend
end if
*********************
kindly try this if not work than reply me...
Bye...
Rupesh
![]() |
Similar Threads
- Please help! execute a query from user input (Java)
- SQL statement help! (Visual Basic 4 / 5 / 6)
- OLEDB QUERY If user input has ' query fails. (C#)
- user input to add to ms sql query (VB.NET)
- help with printing out user input with struct Record (C++)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Export data to Excel Template
- Next Thread: I am desparately in need of help with Filemaker Pro 8 Running Balance
| Thread Tools | Search this Thread |





