|
BETWEEN is a mathematical comparison, when used on strings it simply selects, alphabetically, if the row is between the two values. Because you changed your date column to a char column, its no longer a date and between doesn't mean between the two dates, it means between the two strings alphabetically.
You really need to have that be a date column to use the BETWEEN correctly.
|
|
|
|
|
Hi Ron,
Thank you for your reply. I understood the BETWEEN comparison. I would like to say that, if I make the datatype of the field "date", it never displays any data. I don't know why. Is there any fault in my code ? Another thing is, if I convert the string in to date then is it possible to calculate ?
|
|
|
|
|
Sorry, it is not possible I think because how can I retrieve the database datatype string in to datetime. So what should I do, make the field datatype "Date" or "DateTime" ?
|
|
|
|
|
Ok, now I changed the DataType in to Date and changed the dates in to "yyyy-MM-dd" format in the database and changed my code for MySQL Date format...
Dim DateFrom As String = Convert.ToDateTime(DtpFrom.Value).ToString("yyyy-MM-dd")
Dim DateTo As String = Convert.ToDateTime(DtpTo.Value).ToString("yyyy-MM-dd")
Now it retrieving the data correctly in between two dates but a new problem arises. The report date field not showing any date.
While viewing the datasource of crystal report (XML), the schema shows...
<xs:element name="IncDate" msdata:DataType="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" type="xs:anyType" minOccurs="0" />
and the data shows (in XML)
<IncDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TimezoneOffset>0</TimezoneOffset>
<Year>2013</Year>
<Month>12</Month>
<Day>25</Day>
<Hour>0</Hour>
<Minute>0</Minute>
<Second>0</Second>
<Millisecond>0</Millisecond>
</IncDate>
What should I do ?
Please note that in my ConnectionString the Allow Zero Datetime is set to "True". Is this the problem ?
modified 9-Jan-14 13:19pm.
|
|
|
|
|
Biplob Singha Shee wrote: If yes, then in which format ?
That's the entire point behind using a PARAMETERIZED QUERY. You don't have to worry about the format AT ALL!! It's automatically handled by the Parameter object.
|
|
|
|
|
Hi Dave,
Thank you for your answer. I am trying to solve this problem with parameterized queries however there is something wrong in my code I think. Let me check this first.
Thanks again,
Regards,
Biplob
|
|
|
|
|
What is COM,DCOM,COM+ component with Examples.
|
|
|
|
|
Use Google, it will find you many examples.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I have checked quite a few sites and articles but am not able to figure out how to solve my problem. The problem is:
I am creating a setup for a project. In that I want to include 2 more EXEs which will perform while the setup is run. 1. Wirting Serial number into the registry and 2. Installation of MySql.
I have tried with Custom Action but it copies the Serial Number Registration EXE in the folder where the installation is taking place. This I don't want. It should run the file and then remove it.
If anybody can help me in this I will be obliged.
|
|
|
|
|
SPSandy wrote: it copies the Serial Number Registration EXE in the folder where the installation is taking place That's OK - add another custom action which runs that executable, and one more which removes it.
As for the MySQL installation, you could try a precondition for your setup.
|
|
|
|
|
Thanks for the suggestion. I did that but the setup gets abandoned once I remove the EXE.
|
|
|
|
|
I think he meant add an action that removes the exe after set-up is complete..
|
|
|
|
|
I just found out a VB.NET DLL application was not, as I thought, put into SourceSafe. I do have the complied code (DLL, PDB, XML). Is there anyway I can recover the bulk of the original .NET code?
The folders were supposed to be backed up, but obviously weren't...
Thanks in advance,
Tim
|
|
|
|
|
Download JetBrains DotPeek[^], it has an option for decompiling back to a project. As long as the original project wasn't obfuscated it should produce workable (or close to it) code.
Edit: JetBrains produces C# code, you can use any number of C# to VB converters to convert it back to VB.
|
|
|
|
|
Thanks for the information; working on the recovery and will advise of my results.
|
|
|
|
|
How to plot sin wave in vb.net
|
|
|
|
|
Try this link[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
What is the exact use of data repeater??
|
|
|
|
|
|
how to fill the values from a sqldataadapter to datagridview in vb.net
|
|
|
|
|
|
|
I have using 64 bit system. i am using crystal report but report viewer not supported in 64 bit system. (Server 2008 R2)please tell me any answer.
Pankaj tripathi
|
|
|
|
|
|
Dim Query = From T1 In DataTable1 _
Join T2 In DataTable2 On T1("ID_DataTable1") Equals T1("ID_DataTable2") _
Select (Function(p, index) New With {.RowNumber = index+1})
no row get

|
|
|
|