Click here to Skip to main content
15,899,475 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server 2000 reporting services problem Pin
lucluv4-Feb-07 17:25
lucluv4-Feb-07 17:25 
QuestionCan't access last row of table after 68 rows...HELP!! Pin
Skcheng4-Feb-07 15:09
Skcheng4-Feb-07 15:09 
AnswerRe: Can't access last row of table after 68 rows...HELP!! Pin
PIEBALDconsult4-Feb-07 16:22
mvePIEBALDconsult4-Feb-07 16:22 
GeneralRe: Can't access last row of table after 68 rows...HELP!! Pin
Skcheng4-Feb-07 17:44
Skcheng4-Feb-07 17:44 
QuestionDataGridView vb.net 2005 ???? Pin
kindman_nb4-Feb-07 8:36
kindman_nb4-Feb-07 8:36 
QuestionSQL Server 2000 error : Key Column in Insufficient..... Pin
kindman_nb4-Feb-07 6:34
kindman_nb4-Feb-07 6:34 
AnswerRe: SQL Server 2000 error : Key Column in Insufficient..... Pin
Colin Angus Mackay4-Feb-07 11:45
Colin Angus Mackay4-Feb-07 11:45 
GeneralRe: SQL Server 2000 error : Key Column in Insufficient..... Pin
kindman_nb5-Feb-07 7:03
kindman_nb5-Feb-07 7:03 
QuestionA SQL procedure to STOP repeated info being stored Pin
tedhill134-Feb-07 5:58
tedhill134-Feb-07 5:58 
AnswerRe: A SQL procedure to STOP repeated info being stored Pin
Colin Angus Mackay4-Feb-07 11:40
Colin Angus Mackay4-Feb-07 11:40 
GeneralRe: A SQL procedure to STOP repeated info being stored Pin
tedhill134-Feb-07 23:23
tedhill134-Feb-07 23:23 
GeneralRe: A SQL procedure to STOP repeated info being stored Pin
Colin Angus Mackay5-Feb-07 1:30
Colin Angus Mackay5-Feb-07 1:30 
AnswerRe: A SQL procedure to STOP repeated info being stored Pin
PIEBALDconsult4-Feb-07 16:34
mvePIEBALDconsult4-Feb-07 16:34 
QuestionSample application Pin
CoolOT3-Feb-07 7:25
CoolOT3-Feb-07 7:25 
AnswerRe: Sample application Pin
User 17164923-Feb-07 8:10
professionalUser 17164923-Feb-07 8:10 
QuestionReading Return Val from SP Called from VB.NET? Pin
Justin Cooke2-Feb-07 7:05
Justin Cooke2-Feb-07 7:05 
AnswerRe: Reading Return Val from SP Called from VB.NET? Pin
Colin Angus Mackay2-Feb-07 8:47
Colin Angus Mackay2-Feb-07 8:47 
QuestionSql Server query syntax needed Pin
Saira Tanwir2-Feb-07 6:56
Saira Tanwir2-Feb-07 6:56 
AnswerRe: Sql Server query syntax needed Pin
Colin Angus Mackay2-Feb-07 8:38
Colin Angus Mackay2-Feb-07 8:38 
AnswerRe: Sql Server query syntax needed Pin
PIEBALDconsult2-Feb-07 8:43
mvePIEBALDconsult2-Feb-07 8:43 
QuestionSQL Query Pin
Tyrone_whitey2-Feb-07 5:00
Tyrone_whitey2-Feb-07 5:00 
AnswerRe: SQL Query Pin
andyharman2-Feb-07 5:56
professionalandyharman2-Feb-07 5:56 
Your code should use:
... " WHERE " & FieldHead & " LIKE '" & Replace(TextBox, "'", "''") & "%'
Instead of:
... " WHERE " & FieldHead & " LIKE '" & TextBox & "%'"
Otherwise it will break if the user enters a single-quote into his search value.

The normal way to show the results is to iterate through each row and column in the result set. However, you might find the following faster:
'Open the recordset and render the data in HTML format.
For Each objField In objRS.Fields
   Call Response.Write("<td nowrap><b>" & _
         Server.HtmlEncode(objField.Name) & "</b></td>" & vbCRLF)
Next
Call Response.Write("</tr>" & vbCRLF)
Call Response.Write("<tr>")
If Not objRs.eof Then
   strData = objRS.GetString( , , "#<#/td#>##<#td#>#", _
         "#<#/td#>##<#/tr#>##<#tr#>##<#td nowrap#>#", "#&#nbsp;")
   strData = Replace(Replace(Replace(strData, "#&#", Chr(1)), "&", "&amp;"), Chr(1), "&")
   strData = Replace(Replace(Replace(strData, "#<#", Chr(1)), "<", "&lt;"), Chr(1), "<")
   strData = Replace(Replace(Replace(strData, "#>#", Chr(1)), ">", "&gt;"), Chr(1), ">")
   strData = "<td>" & Replace(Left(strData, Len(strData) - 15), "</tr>", "</tr>" & vbCRLF)
   Call Response.Write(strData)
Else
   Call Response.Write("<td colspan=""" & objRs.Fields.Count & """>No records found.</td></tr>" & vbCRLF)
End If
Call Response.Write("</table>" & vbCRLF)
The funny replace stuff is a quick way to get it to render each field as a separate HTML table cell.

Andy
QuestionProblems with a delete TSQL statement Pin
matthias s.2-Feb-07 3:18
matthias s.2-Feb-07 3:18 
AnswerRe: Problems with a delete TSQL statement Pin
Colin Angus Mackay2-Feb-07 3:38
Colin Angus Mackay2-Feb-07 3:38 
GeneralRe: Problems with a delete TSQL statement Pin
matthias s.2-Feb-07 3:56
matthias s.2-Feb-07 3:56 

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.