VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 300,441 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,521 people online right now. Registration is fast and FREE... Join Now!




<> = " " how is SQL pulling

 

<> = " " how is SQL pulling

MoistFist

1 Jul, 2009 - 04:00 AM
Post #1

D.I.C Head
**

Joined: 2 Jun, 2009
Posts: 76


My Contributions
So below i have an if else statement, and the dishchargeDateTime and Admit are being pulled from one database but i am also pulling a history number from another database not shown below. My question is that. If i am pulling and supposedly matching the history number with both of the Dish and admit dates below, would my not equal to <> and "" bring back a true value. In other words an example below, the first IF, if iam right it should only bring true the "AdmitDateTime").ToString <> "" right? and null will be in the ("DischargeDateTime").ToString = ""
Also is there a way i can only bring a result like in this case a date. If i only want to result a date from may 5, 2009?


IF i am wrong please let me know

thanks


CODE
If dr2.Item("DischargeDateTime").ToString = "" And dr2.Item("AdmitDateTime").ToString <> "" Then
                    'Do nothing! patient is active in EPR'



                ElseIf dr2.Item("DischargeDateTime").ToString = "" Or dr2.Item("AdmitDateTime").ToString <> "" Then
                    'Send an A11 to discharge patient to cancel out of EPR since they have no admitdate or dishchargedate'

                  
                        sMessage = ""
                      

                        oWrite = File.AppendText(sPath)
                        oWrite.WriteLine(sMessage)
                        oWrite.Flush()
                        oWrite.Close()

                    End If

                ElseIf dr2.Item("DischargeDateTime").ToString = "" And dr2.Item("AdmitDateTime").ToString <> "" Then
                    'Send an A03 message to





User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:23AM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month