Greeting everyone, I come across a problem when trying to retrieve white space from SQLCE database. I'm using Visual Studio 2008, VB.NET, v3.5 Compact Framework, it's a Smart Device Project.
I have to store white space into database for text split later.
I retrieve the data from database using the below method :
Dim da As New SqlCeDataAdapter("SELECT * FROM tblMaker WHERE maker_id = ?", openConn())
da.SelectCommand.Parameters.AddWithValue("maker_id", cboMaker.SelectedValue)
Dim ds As New DataSet
da.Fill(ds)
ds.Tables(0).Rows(0)(0) 'this method
For example, ds.Tables(0).Rows(0)(2)
is a white space. But when I try to retrieve it, it return nothing instead giving me a white space.
The method I use to split text is : readerData.Text.Split("" & ds.Tables(0).Rows(0)(2) & "")(1)
So my question is how can I retrieve the white space from database? It seem that it consider a whitespace as NULL hence return me nothing.
My temporary solution is populate the data into a DataGrid and retrieve value from DataGrid directly, but this is not a good solution, please advice. :)
P/S : whitespace mean " "
Thanks!