Click here to Skip to main content
15,920,217 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionpng lossless resize Pin
JellyCoe4-Feb-13 5:39
JellyCoe4-Feb-13 5:39 
AnswerRe: png lossless resize Pin
237414-Feb-13 6:54
237414-Feb-13 6:54 
QuestionCustom Tab Control that I found on here Pin
NSoft Studios3-Feb-13 13:10
NSoft Studios3-Feb-13 13:10 
AnswerRe: Custom Tab Control that I found on here Pin
Dave Kreskowiak3-Feb-13 13:19
mveDave Kreskowiak3-Feb-13 13:19 
GeneralRe: Custom Tab Control that I found on here Pin
NSoft Studios3-Feb-13 13:44
NSoft Studios3-Feb-13 13:44 
GeneralRe: Custom Tab Control that I found on here Pin
Richard MacCutchan3-Feb-13 22:40
mveRichard MacCutchan3-Feb-13 22:40 
QuestionRetrieving Custom Attributes Pin
Dominick Marciano1-Feb-13 21:34
professionalDominick Marciano1-Feb-13 21:34 
AnswerRe: Retrieving Custom Attributes Pin
Eddy Vluggen2-Feb-13 2:11
professionalEddy Vluggen2-Feb-13 2:11 
QuestionSearch criteria - classic asp not working Pin
miss78631-Jan-13 4:01
miss78631-Jan-13 4:01 
AnswerRe: Search criteria - classic asp not working Pin
Eddy Vluggen31-Jan-13 10:18
professionalEddy Vluggen31-Jan-13 10:18 
GeneralRe: Search criteria - classic asp not working Pin
miss7866-Feb-13 1:03
miss7866-Feb-13 1:03 
GeneralRe: Search criteria - classic asp not working Pin
Eddy Vluggen6-Feb-13 7:11
professionalEddy Vluggen6-Feb-13 7:11 
GeneralRe: Search criteria - classic asp not working Pin
miss7866-Feb-13 23:26
miss7866-Feb-13 23:26 
GeneralRe: Search criteria - classic asp not working Pin
Eddy Vluggen7-Feb-13 8:13
professionalEddy Vluggen7-Feb-13 8:13 
AnswerRe: Search criteria - classic asp not working Pin
Eddy Vluggen8-Feb-13 11:04
professionalEddy Vluggen8-Feb-13 11:04 
I only needed to include a connection in the code;
ASP
<%
'collect the form input
searchInput = "xs" 'Request.QueryString("searchInput")
 
Set oConnection = Server.CreateObject("ADODB.Connection")
oConnection.Open "Driver={SQL Server};Server=.\MSSQL;Database=master;Trusted_Connection=yes;"
'check for a match
Dim sQuery 
sQuery = "SELECT * FROM dbo.tt WHERE cusip LIKE '%" & searchInput & "%' OR isin LIKE '%" & searchInput & "%'"
Response.Write("sQuery=" & sQuery)
Set myRecordSet = oConnection.Execute(sQuery) 

'display the results
if myRecordSet.EOF then
  response.write("You searched for: " & searchInput & "<br>")
  response.write("A match was not found.<br>Sorry try again.")
else
  response.write("You searched for: " & searchInput & "<br>")
  response.write("Records were found!<br>The matches are:<br>")
  do until myRecordSet.EOF
    response.write(myRecordSet("name") & "<br>")
    response.write(myRecordSet("cusip") & "<br>")
    response.write(myRecordSet("isin") & "<br>")
    myRecordSet.MoveNext
  loop
end if

oConnection.Close
Set oConnection = Nothing
%>

I got these results in the browser;
<br />
sQuery=SELECT * FROM dbo.tt WHERE cusip LIKE '%xs%' OR isin LIKE '%xs%'You searched for: xs<br />
Records were found!<br />
The matches are:<br />
a1<br />
XS123<br />
<br />
b1<br />
XS234


Did you "Dim" the myRecordset in code that was not in your post? Reusing a previous variable?
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

QuestionWebBrowser Dock covers up statusstrip Pin
NSoft Studios30-Jan-13 15:46
NSoft Studios30-Jan-13 15:46 
AnswerRe: WebBrowser Dock covers up statusstrip Pin
Richard MacCutchan30-Jan-13 22:13
mveRichard MacCutchan30-Jan-13 22:13 
AnswerRe: WebBrowser Dock covers up statusstrip Pin
Eddy Vluggen30-Jan-13 22:36
professionalEddy Vluggen30-Jan-13 22:36 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
Dave Kreskowiak31-Jan-13 3:35
mveDave Kreskowiak31-Jan-13 3:35 
SuggestionRe: WebBrowser Dock covers up statusstrip Pin
Eddy Vluggen31-Jan-13 3:38
professionalEddy Vluggen31-Jan-13 3:38 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
Dave Kreskowiak31-Jan-13 6:52
mveDave Kreskowiak31-Jan-13 6:52 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
Eddy Vluggen31-Jan-13 10:12
professionalEddy Vluggen31-Jan-13 10:12 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
NSoft Studios3-Feb-13 12:58
NSoft Studios3-Feb-13 12:58 
AnswerRe: WebBrowser Dock covers up statusstrip Pin
rohitvermasrt31-Jan-13 18:28
rohitvermasrt31-Jan-13 18:28 
QuestionQuery dataTable with .Compute Pin
mebjen30-Jan-13 9:05
mebjen30-Jan-13 9:05 

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.