Click here to Skip to main content
15,913,944 members
Home / Discussions / Visual Basic
   

Visual Basic

 
SuggestionRe: Read a messages in vb.net, itry to create a script that can read a sms if someone reply to your text via gsm modem. Pin
Richard MacCutchan9-Mar-19 21:50
mveRichard MacCutchan9-Mar-19 21:50 
SuggestionRe: Read a messages in vb.net, itry to create a script that can read a sms if someone reply to your text via gsm modem. Pin
Ralf Meier10-Mar-19 22:13
mveRalf Meier10-Mar-19 22:13 
GeneralRe: Read a messages in vb.net, itry to create a script that can read a sms if someone reply to your text via gsm modem. Pin
jhane Harvest10-Mar-19 22:28
jhane Harvest10-Mar-19 22:28 
SuggestionRe: Read a messages in vb.net, itry to create a script that can read a sms if someone reply to your text via gsm modem. Pin
Ralf Meier11-Mar-19 1:17
mveRalf Meier11-Mar-19 1:17 
GeneralRe: Read a messages in vb.net, itry to create a script that can read a sms if someone reply to your text via gsm modem. Pin
jhane Harvest11-Mar-19 14:46
jhane Harvest11-Mar-19 14:46 
QuestionSyntax Error (Missing Operation) in query expression Pin
RedPandinus9-Mar-19 5:47
RedPandinus9-Mar-19 5:47 
AnswerRe: Syntax Error (Missing Operation) in query expression Pin
Gerry Schmitz9-Mar-19 11:02
mveGerry Schmitz9-Mar-19 11:02 
GeneralRe: Syntax Error (Missing Operation) in query expression Pin
RedPandinus9-Mar-19 11:11
RedPandinus9-Mar-19 11:11 
same error comes up at below too, whats mistake here in syntax ?

Private Sub RetrieveData(Optional ByVal blnSearch As Boolean = False)
       strSQL = " SELECT tblContact.ContactPK, tblContact.Fullname, tblContact.Nickname, tblContact.Mobile, " &
                   " tblContact.Phone, tblContact.eMail, tblContact.FacebookID, tblContact.PictureName, tblContact.Note, tblContact.Mobil, tblContact.Area, tblContact.City, tblContact.State, tblContact.Country, tblContact.Responsible, " &
                   " tblPosition.PositionName, tblDepartment.DepartmentName " &
                   " FROM [tblPosition] INNER JOIN (tblDepartment INNER JOIN tblContact ON " &
                   " tblDepartment.DepartmentPK = tblContact.DepartmentFK) ON tblPosition.PositionPK = tblContact.PositionFK "

       '// blnSearch = True for Search
       If blnSearch Then
           strSQL = strSQL &
               " WHERE " &
               " [Fullname] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Nickname] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [PositionName] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [DepartmentName] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Mobile] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Phone] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [eMail] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [FaceBookID] " & " Like '%" & txtSearch.Text & "%'" &
               " [Mobil] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Area] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [City] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [State] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Country] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " [Responsible] " & " Like '%" & txtSearch.Text & "%'" & " OR " &
               " ORDER BY ContactPK "
       Else
           strSQL = strSQL & " ORDER BY ContactPK "
       End If
       '//
       Try
           Cmd = New OleDbCommand
           If Conn.State = ConnectionState.Closed Then Conn.Open()
           Cmd.Connection = Conn
           Cmd.CommandText = strSQL
           Dim DR As OleDbDataReader = Cmd.ExecuteReader
           Dim i As Long = dgvData.RowCount
           While DR.Read
               With dgvData
                   .Rows.Add(i)
                   .Rows(i).Cells(0).Value = DR.Item("ContactPK").ToString
                   .Rows(i).Cells(1).Value = DR.Item("Fullname").ToString
                   .Rows(i).Cells(2).Value = DR.Item("Nickname").ToString
                   .Rows(i).Cells(3).Value = DR.Item("PositionName").ToString
                   .Rows(i).Cells(4).Value = DR.Item("DepartmentName").ToString
                   .Rows(i).Cells(5).Value = DR.Item("Mobile").ToString
                   .Rows(i).Cells(6).Value = DR.Item("Phone").ToString
                   .Rows(i).Cells(7).Value = DR.Item("eMail").ToString
                   .Rows(i).Cells(8).Value = DR.Item("FaceBookID").ToString
                   .Rows(i).Cells(9).Value = DR.Item("PictureName").ToString
                   newFileName = DR.Item("PictureName").ToString
                   .Rows(i).Cells(10).Value = DR.Item("Note").ToString
                   .Rows(i).Cells(11).Value = DR.Item("Mobil").ToString
                   .Rows(i).Cells(12).Value = DR.Item("Area").ToString
                   .Rows(i).Cells(13).Value = DR.Item("City").ToString
                   .Rows(i).Cells(14).Value = DR.Item("State").ToString
                   .Rows(i).Cells(15).Value = DR.Item("Country").ToString
                   .Rows(i).Cells(16).Value = DR.Item("Responsible").ToString

               End With
               i += 1
           End While
           lblRecordCount.Text = "[total : " & dgvData.RowCount & " record]"
           DR.Close()

       Catch ex As Exception
           MessageBox.Show(ex.Message)
       End Try
       '//
       txtSearch.Clear()
   End Sub

GeneralRe: Syntax Error (Missing Operation) in query expression Pin
Mycroft Holmes9-Mar-19 11:40
professionalMycroft Holmes9-Mar-19 11:40 
AnswerRe: Syntax Error (Missing Operation) in query expression Pin
Richard Deeming11-Mar-19 9:27
mveRichard Deeming11-Mar-19 9:27 
AnswerRe: Syntax Error (Missing Operation) in query expression Pin
Mycroft Holmes11-Mar-19 11:37
professionalMycroft Holmes11-Mar-19 11:37 
GeneralRe: Syntax Error (Missing Operation) in query expression Pin
RedPandinus12-Mar-19 9:04
RedPandinus12-Mar-19 9:04 
QuestionType conversion in VB.NET Pin
Revolution Radio9-Mar-19 3:03
Revolution Radio9-Mar-19 3:03 
QuestionRe: Type conversion in VB.NET Pin
Richard MacCutchan9-Mar-19 4:14
mveRichard MacCutchan9-Mar-19 4:14 
AnswerRe: Type conversion in VB.NET Pin
Revolution Radio9-Mar-19 5:22
Revolution Radio9-Mar-19 5:22 
GeneralRe: Type conversion in VB.NET Pin
Richard MacCutchan9-Mar-19 6:36
mveRichard MacCutchan9-Mar-19 6:36 
GeneralRe: Type conversion in VB.NET Pin
Revolution Radio11-Mar-19 0:43
Revolution Radio11-Mar-19 0:43 
QuestionQuestion for fetching the data from table Pin
Member 141728245-Mar-19 23:01
Member 141728245-Mar-19 23:01 
AnswerRe: Question for fetching the data from table Pin
CHill607-Mar-19 1:46
mveCHill607-Mar-19 1:46 
AnswerRe: Question for fetching the data from table Pin
Richard MacCutchan7-Mar-19 1:52
mveRichard MacCutchan7-Mar-19 1:52 
QuestionTrying to set caret at correct offset: CLOSED Pin
mo149228-Feb-19 7:58
mo149228-Feb-19 7:58 
QuestionSystem.Data.OLEDB, my OLEDB connection stopped working in Win10 X64 Pin
jkirkerx26-Feb-19 7:47
professionaljkirkerx26-Feb-19 7:47 
AnswerTried some more things Pin
jkirkerx26-Feb-19 8:27
professionaljkirkerx26-Feb-19 8:27 
AnswerRe: System.Data.OLEDB, my OLEDB connection stopped working in Win10 X64 Pin
Maciej Los26-Feb-19 8:46
mveMaciej Los26-Feb-19 8:46 
QuestionMessage Closed Pin
11-Feb-19 1:03
manju 311-Feb-19 1:03 

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.