Click here to Skip to main content
15,887,822 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionInstallation Problem in VB Pin
aaraaayen11-May-08 21:07
aaraaayen11-May-08 21:07 
AnswerRe: Installation Problem in VB Pin
Christian Graus11-May-08 21:26
protectorChristian Graus11-May-08 21:26 
AnswerRe: Installation Problem in VB Pin
Dave Kreskowiak12-May-08 5:14
mveDave Kreskowiak12-May-08 5:14 
QuestionCorrect way to filter a databound combobox based on selection in other databound combobox? Pin
Gr1mR33p3r11-May-08 20:17
Gr1mR33p3r11-May-08 20:17 
AnswerRe: Correct way to filter a databound combobox based on selection in other databound combobox? Pin
Christian Graus11-May-08 20:59
protectorChristian Graus11-May-08 20:59 
AnswerRe: Correct way to filter a databound combobox based on selection in other databound combobox? Pin
Rupesh Kumar Swami11-May-08 22:34
Rupesh Kumar Swami11-May-08 22:34 
GeneralRe: Correct way to filter a databound combobox based on selection in other databound combobox? Pin
Gr1mR33p3r11-May-08 22:38
Gr1mR33p3r11-May-08 22:38 
QuestionRetrieve data from MySQL and Check the data if anything exited Pin
drexler_kk11-May-08 17:06
drexler_kk11-May-08 17:06 
Hello all,I'm using VS 2003,VB.NET creating a window form application. I found problem on retrieving data from my MySQL database which have varchar and tinytext column. I found error when I try to check if any data exited by using ObjRead.Read. Anyone can give me a solution on how to check the existance of the data inside the MySQL table using VB.NET?

The following are the database table structure of the command running:
Field         Type         Collation          Null    Key     Default  Extra   Privileges                       Comment<br />
------------  -----------  -----------------  ------  ------  -------  ------  -------------------------------  -------<br />
LocationCode  varchar(10)  latin1_swedish_ci  NO      PRI                      select,insert,update,references         <br />
SettingKey    varchar(10)  latin1_swedish_ci  NO      PRI                      select,insert,update,references         <br />
SettingValue  tinytext     latin1_swedish_ci  YES             (NULL)           select,insert,update,references    


The following are the Code I used to check and I'm using If Statement to control the situation:
<br />
 Try   'Check Server IP<br />
            Dim s As String<br />
            ObjComm = New OdbcCommand("SELECT SettingValue FROM pos_setting WHERE LocationCode='" & TerminalLocate & "' AND SettingKey='Server_IP' ", ObjConn)<br />
<br />
            ObjConn.Open()<br />
            ObjRead = ObjComm.ExecuteReader()<br />
            If ObjRead.Read Then<br />
                ObjConn.Close()<br />
<br />
                s = ObjRead.Item(0)<br />
                If (s = 0 Or s = 1 Or Len(s) < 3 Or s = "") Then<br />
                 'Something run here<br />
<br />
                Else<br />
<br />
                End If<br />
            Else<br />
                MessageBox.Show("Error on Checking Server IP")<br />
            End If<br />
        Catch ex As Exception<br />
            MessageBox.Show("Error : " + ex.Message)<br />
        Finally<br />
            ObjConn.Close()<br />
        End Try


I have put some integer into the table:
Example: LocationCode=KK SettingKey=ServerIP SettingValue=192.168.2.80

But when I run it,it shows me this error:
Error: No data exist for the row/column.

Why could this happen? Anyone can give me some solution?

Thanks for reading.
AnswerRe: Retrieve data from MySQL and Check the data if anything exited Pin
Alsvha11-May-08 20:45
Alsvha11-May-08 20:45 
GeneralRe: Retrieve data from MySQL and Check the data if anything exited Pin
drexler_kk11-May-08 21:50
drexler_kk11-May-08 21:50 
AnswerRe: Retrieve data from MySQL and Check the data if anything exited Pin
CodingYoshi11-May-08 20:46
CodingYoshi11-May-08 20:46 
GeneralRe: Retrieve data from MySQL and Check the data if anything exited Pin
drexler_kk11-May-08 21:56
drexler_kk11-May-08 21:56 
QuestionHELP What are Properties and Control properties? Pin
peachqueenoh11-May-08 15:08
peachqueenoh11-May-08 15:08 
AnswerRe: HELP What are Properties and Control properties? Pin
Christian Graus11-May-08 15:39
protectorChristian Graus11-May-08 15:39 
GeneralRe: HELP What are Properties and Control properties? Pin
peachqueenoh11-May-08 16:07
peachqueenoh11-May-08 16:07 
GeneralRe: HELP What are Properties and Control properties? Pin
Christian Graus11-May-08 16:08
protectorChristian Graus11-May-08 16:08 
AnswerRe: HELP What are Properties and Control properties? Pin
Ray Cassick11-May-08 17:26
Ray Cassick11-May-08 17:26 
QuestionHow to: Display an Image in an Individual Cell of the DataGridView (Visual Basic) Pin
Graham Irons11-May-08 14:34
Graham Irons11-May-08 14:34 
AnswerRe: How to: Display an Image in an Individual Cell of the DataGridView (Visual Basic) Pin
Dave Kreskowiak12-May-08 5:06
mveDave Kreskowiak12-May-08 5:06 
GeneralRe: How to: Display an Image in an Individual Cell of the DataGridView (Visual Basic) Pin
Graham Irons12-May-08 16:04
Graham Irons12-May-08 16:04 
QuestionNamespace Warning Pin
dBrong11-May-08 14:08
dBrong11-May-08 14:08 
AnswerRe: Namespace Warning Pin
Dave Kreskowiak12-May-08 5:04
mveDave Kreskowiak12-May-08 5:04 
QuestionGrouping dates by week...Is it possible? Pin
Mikjall11-May-08 12:59
Mikjall11-May-08 12:59 
AnswerRe: Grouping dates by week...Is it possible? Pin
Christian Graus11-May-08 13:19
protectorChristian Graus11-May-08 13:19 
GeneralRe: Grouping dates by week...Is it possible? Pin
Mikjall11-May-08 15:12
Mikjall11-May-08 15:12 

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.