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

Visual Basic

 
GeneralRe: How to Make a folder virtual folder using vb 6.0? Pin
Paul Conrad23-Dec-07 15:04
professionalPaul Conrad23-Dec-07 15:04 
QuestionSelecting next row in datagrid Pin
jensenx30-Aug-07 18:11
jensenx30-Aug-07 18:11 
AnswerRe: Selecting next row in datagrid Pin
Naji El Kotob30-Aug-07 21:51
Naji El Kotob30-Aug-07 21:51 
Questionediting cells in a datagridview Pin
steve_rm30-Aug-07 16:33
steve_rm30-Aug-07 16:33 
QuestionVB6 HTML elements offsetParent recursive problem Pin
eugeugeug12330-Aug-07 14:02
eugeugeug12330-Aug-07 14:02 
AnswerRe: VB6 HTML elements offsetParent recursive problem Pin
Dave Kreskowiak31-Aug-07 3:38
mveDave Kreskowiak31-Aug-07 3:38 
QuestionVB.NET Access DB DataSet problem Pin
culbysl30-Aug-07 13:40
culbysl30-Aug-07 13:40 
AnswerRe: VB.NET Access DB DataSet problem Pin
Dave Kreskowiak31-Aug-07 3:33
mveDave Kreskowiak31-Aug-07 3:33 
I'd start by picking a single method to fill a dataset and sticking with it. You've got two different methods in here. And I detest using string concatentation to build an SQL statement. Simplify it!
Public Function GetSelectAnd2Records(ByVal strTableName, ByVal strCriteria1, ByVal strCriteria3) As DataSet
    ' Are you sure Access uses asterisks as wildcards???
    ' I don't know because I don't use Access anymore...
    strCriteria1 = "*" & strCriteria1 & "*"
    strCriteria3 = "*" & strCriteria3 & "*"
 
    Dim strSQL As String = String.Format("SELECT [ID], [Subject], [Body], [Received], [From] " & _
            "FROM {0} WHERE [Body) Like ""{1}"" And (Terminals.Body) Like ""{2}""" & _
            "ORDER BY Received DESC", strTableName, strCriteria1, strCriteria3)
 
    Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NovaEmailKB\KNOWLEDGE BASE SSC.mdb;")
    Dim comm As New OleDbCommand(strSQL, conn)
 
    Console.WriteLine(strSQL)
 
    Try
        Using da As OleDbDataAdapter = New OleDbDataAdapter(comm)
            da.Fill(ds)
        End Using
    Catch ex As Exception
        MsgBox("An unexpected MS Access error has occured: " & ex.Message)
    End Try

    Return ds
End Function





A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: VB.NET Access DB DataSet problem Pin
culbysl31-Aug-07 11:52
culbysl31-Aug-07 11:52 
GeneralRe: VB.NET Access DB DataSet problem Pin
Dave Kreskowiak1-Sep-07 4:15
mveDave Kreskowiak1-Sep-07 4:15 
GeneralRe: VB.NET Access DB DataSet problem Pin
culbysl1-Sep-07 7:51
culbysl1-Sep-07 7:51 
QuestionLoading Google Toolbars in a windows form Pin
Ahmad Zaidi30-Aug-07 10:08
Ahmad Zaidi30-Aug-07 10:08 
QuestionClickOnce Depolyment Pin
DarkJudge30-Aug-07 8:32
DarkJudge30-Aug-07 8:32 
AnswerRe: ClickOnce Depolyment Pin
Mycroft Holmes30-Aug-07 16:33
professionalMycroft Holmes30-Aug-07 16:33 
QuestionAudio Volume Levels in VB6 Pin
Kevnar30-Aug-07 6:29
Kevnar30-Aug-07 6:29 
QuestionOpening all Files within a folder using the FileBrowserDialog Pin
Mr Oizo30-Aug-07 4:41
Mr Oizo30-Aug-07 4:41 
AnswerRe: Opening all Files within a folder using the FileBrowserDialog Pin
Kschuler30-Aug-07 6:29
Kschuler30-Aug-07 6:29 
GeneralRe: Opening all Files within a folder using the FileBrowserDialog Pin
Mr Oizo30-Aug-07 9:02
Mr Oizo30-Aug-07 9:02 
QuestionSwitching to an active Application Pin
programmerwantabe30-Aug-07 4:34
programmerwantabe30-Aug-07 4:34 
AnswerRe: Switching to an active Application Pin
Dave Kreskowiak30-Aug-07 6:48
mveDave Kreskowiak30-Aug-07 6:48 
GeneralRe: Switching to an active Application Pin
programmerwantabe30-Aug-07 7:03
programmerwantabe30-Aug-07 7:03 
QuestionHai all Dynamic Developers.. Pin
Biswaranjan Maharana30-Aug-07 1:16
Biswaranjan Maharana30-Aug-07 1:16 
QuestionUse a PHP Webservice in VB.NET WinApp Pin
j5136p130-Aug-07 1:03
j5136p130-Aug-07 1:03 
AnswerRe: Use a PHP Webservice in VB.NET WinApp Pin
Naji El Kotob30-Aug-07 10:53
Naji El Kotob30-Aug-07 10:53 
GeneralRe: Use a PHP Webservice in VB.NET WinApp Pin
j5136p130-Aug-07 18:53
j5136p130-Aug-07 18:53 

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.