Click here to Skip to main content
15,883,691 members
Home / Discussions / Database
   

Database

 
QuestionSQL Inner Join? Pin
Expert Coming27-Jun-07 14:56
Expert Coming27-Jun-07 14:56 
AnswerRe: SQL Inner Join? Pin
Chinnakasu27-Jun-07 16:31
Chinnakasu27-Jun-07 16:31 
AnswerRe: SQL Inner Join? Pin
Guffa27-Jun-07 20:51
Guffa27-Jun-07 20:51 
QuestionVB.Net 64 bit long to SQL [modified] Pin
Polymorpher27-Jun-07 12:18
Polymorpher27-Jun-07 12:18 
AnswerRe: VB.Net 64 bit long to SQL Pin
Mike Dimmick27-Jun-07 23:13
Mike Dimmick27-Jun-07 23:13 
GeneralRe: VB.Net 64 bit long to SQL Pin
Polymorpher28-Jun-07 9:44
Polymorpher28-Jun-07 9:44 
QuestionSQL Statement for searching in ADO.NET Pin
kinsella_john27-Jun-07 5:00
kinsella_john27-Jun-07 5:00 
AnswerRe: SQL Statement for searching in ADO.NET Pin
DanB198329-Jun-07 0:59
DanB198329-Jun-07 0:59 
Hey

Can the SQL not be something like this

SELECT * FROM T_TABLE
WHERE FIRST_NAME LIKE @PARAM1 AND DESC LIKE @PARAM2

You could then have the user select the filters and call the correct prodedure/pass the correct dynamic SQL.

In the case of the latter row filter would be :

"firstName LIKE '*" & txtSearch.Text & "*' AND lastname LIKE '*" & txtSearch.Text & "*'"

(The syntax of quotation marks may be incorrect as i just copied and pasted yours)

Hope this helps.

PS you may want to use stored procedures instead of dynamic sql as they help with security

Dan

Edit* There are many ways to search on more than one field such as making temporary tables etc this is just a simple example.
GeneralRe: SQL Statement for searching in ADO.NET Pin
kinsella_john29-Jun-07 1:34
kinsella_john29-Jun-07 1:34 
GeneralRe: SQL Statement for searching in ADO.NET Pin
DanB198329-Jun-07 2:48
DanB198329-Jun-07 2:48 
GeneralRe: SQL Statement for searching in ADO.NET Pin
kinsella_john3-Jul-07 3:45
kinsella_john3-Jul-07 3:45 
GeneralRe: SQL Statement for searching in ADO.NET [modified] Pin
DanB19833-Jul-07 4:08
DanB19833-Jul-07 4:08 
QuestionUrgent need in procedure........... Pin
Member 387988127-Jun-07 3:23
Member 387988127-Jun-07 3:23 
AnswerRe: Urgent need in procedure........... Pin
Tarakeshwar Reddy27-Jun-07 6:08
professionalTarakeshwar Reddy27-Jun-07 6:08 
QuestionPartial update via OleDBDataAdaptor Pin
Dan Neely27-Jun-07 3:12
Dan Neely27-Jun-07 3:12 
AnswerRe: Partial update via OleDBDataAdaptor Pin
Dave Kreskowiak27-Jun-07 5:19
mveDave Kreskowiak27-Jun-07 5:19 
GeneralRe: Partial update via OleDBDataAdaptor Pin
Dan Neely27-Jun-07 5:40
Dan Neely27-Jun-07 5:40 
GeneralRe: Partial update via OleDBDataAdaptor Pin
Dave Kreskowiak27-Jun-07 5:55
mveDave Kreskowiak27-Jun-07 5:55 
QuestionI want to secure my DB Pin
merwa27-Jun-07 2:35
merwa27-Jun-07 2:35 
AnswerRe: I want to secure my DB Pin
Vasudevan Deepak Kumar27-Jun-07 2:47
Vasudevan Deepak Kumar27-Jun-07 2:47 
QuestionSQL Server 2000 mirror Database Pin
AcDev727-Jun-07 1:01
AcDev727-Jun-07 1:01 
AnswerRe: SQL Server 2000 mirror Database Pin
Mike Dimmick27-Jun-07 2:24
Mike Dimmick27-Jun-07 2:24 
GeneralRe: SQL Server 2000 mirror Database Pin
Colin Angus Mackay27-Jun-07 12:19
Colin Angus Mackay27-Jun-07 12:19 
GeneralRe: SQL Server 2000 mirror Database Pin
Mike Dimmick27-Jun-07 23:30
Mike Dimmick27-Jun-07 23:30 
QuestionStored procedure Pin
sidbaruah26-Jun-07 23:36
sidbaruah26-Jun-07 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.