Click here to Skip to main content
15,916,318 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to pass parameter in reportviewer which is calling .RDLC report Pin
TnTinMn23-Jul-13 7:34
TnTinMn23-Jul-13 7:34 
QuestionVB6 output Access 2000 report to pdf Pin
Member 981947022-Jul-13 9:53
Member 981947022-Jul-13 9:53 
AnswerRe: VB6 output Access 2000 report to pdf Pin
Mycroft Holmes22-Jul-13 12:48
professionalMycroft Holmes22-Jul-13 12:48 
AnswerRe: VB6 output Access 2000 report to pdf Pin
Dave Kreskowiak22-Jul-13 13:55
mveDave Kreskowiak22-Jul-13 13:55 
Questionvbaproject.bin read Pin
JR21220-Jul-13 3:35
JR21220-Jul-13 3:35 
AnswerRe: vbaproject.bin read Pin
Dave Kreskowiak20-Jul-13 7:08
mveDave Kreskowiak20-Jul-13 7:08 
AnswerRe: vbaproject.bin read Pin
TnTinMn20-Jul-13 11:52
TnTinMn20-Jul-13 11:52 
QuestionHow to find mysql table field is empty ? Pin
Biplob Singha Shee19-Jul-13 22:42
Biplob Singha Shee19-Jul-13 22:42 
Hi,

I have a MySql table.

Table Name : Rate
Fields:
1. CurrentDate
SQL
(DataType : Date /*Primary Key*/)

2. MaterialPrice
SQL
(DataType : DOUBLE(10,3) )


In above everyday I have to enter the MaterialPrice as it changes everyday.

I created a form for the above table

I want to do that when my MdiForm loads, it checks if the Current Date data is blank and if it has no records then it open the form associated with the table(Rate).

I tried...
VB
Private Sub FormMdi_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim d As Date = Date.Today
    qry = "SELECT * FROM Rate WHERE CurrentDate =" & d & ""
    Try
        OpenConnection()
        Dim dbcommand As New MySqlCommand
        dbcommand.Connection = conn
        dbcommand.CommandText = qry
        Dim dbread As MySqlDataReader = dbcommand.ExecuteReader
        While (dbread.Read())
            If dbread("CurrentDate") = "" Then
                Dim f As New FormRate '// This is the form associated with the table
                f.Show()
                f.Owner = Me
            End If
        End While
    Catch ex As Exception
        MsgBox(ex.Message)
    Finally
        CloseConnection()
    End Try
End Sub


It not opening the form. While debugging it, I saw the control goes to
VB
Finally
            CloseConnection()
directly from
VB
While (dbread.Read())
but not firing
VB
If dbread("CurrentDate") = "" Then
                    Dim f As New Rate '// This is the form associated with the table
                    f.Show()
                    f.Owner = Me
                End If
and the formMdi opens.

My purpose not solved.

For your information, Table "Rate" is completely blank or has no records.

Please Help

modified 20-Jul-13 5:39am.

AnswerRe: How to find mysql table field is empty ? Pin
Biplob Singha Shee20-Jul-13 0:32
Biplob Singha Shee20-Jul-13 0:32 
QuestionERROR When I Show Openfiledialog.ShowDialog() Pin
Sang Nguyen Minh19-Jul-13 8:44
Sang Nguyen Minh19-Jul-13 8:44 
SuggestionRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Richard Deeming19-Jul-13 8:59
mveRichard Deeming19-Jul-13 8:59 
AnswerRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Richard MacCutchan19-Jul-13 22:19
mveRichard MacCutchan19-Jul-13 22:19 
AnswerRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Dave Kreskowiak20-Jul-13 2:57
mveDave Kreskowiak20-Jul-13 2:57 
GeneralRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Sang Nguyen Minh20-Jul-13 6:21
Sang Nguyen Minh20-Jul-13 6:21 
QuestionEncryption AES256 Trouble.. Pin
markapk18-Jul-13 7:56
markapk18-Jul-13 7:56 
AnswerRe: Encryption AES256 Trouble.. Pin
Kenneth Haugland18-Jul-13 20:09
mvaKenneth Haugland18-Jul-13 20:09 
GeneralRe: Encryption AES256 Trouble.. Pin
markapk18-Jul-13 22:04
markapk18-Jul-13 22:04 
GeneralRe: Encryption AES256 Trouble.. Pin
Matty2229-Jul-13 19:16
Matty2229-Jul-13 19:16 
GeneralRe: Encryption AES256 Trouble.. Pin
markapk29-Jul-13 20:21
markapk29-Jul-13 20:21 
GeneralRe: Encryption AES256 Trouble.. Pin
markapk8-Aug-15 11:41
markapk8-Aug-15 11:41 
QuestionHow to get ListView item Icons ? Pin
Biplob Singha Shee17-Jul-13 7:34
Biplob Singha Shee17-Jul-13 7:34 
AnswerRe: How to get ListView item Icons ? Pin
Richard MacCutchan17-Jul-13 21:20
mveRichard MacCutchan17-Jul-13 21:20 
AnswerRe: How to get ListView item Icons ? Pin
TnTinMn18-Jul-13 11:36
TnTinMn18-Jul-13 11:36 
QuestionHow To Populate Data In Another Form Of Display Pin
12345_abcde15-Jul-13 3:36
12345_abcde15-Jul-13 3:36 
AnswerRe: How To Populate Data In Another Form Of Display Pin
Eddy Vluggen18-Jul-13 6:38
professionalEddy Vluggen18-Jul-13 6:38 

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.