sqlce Select

  • Thread starter Thread starter mikeb
  • Start date Start date
M

mikeb

I'm trying to do a select on my sqlce database -

Select * from myTestTable Where (factory = 'ASDF') and (trackno = 'XC')

I can see records with these values in the factory and trackno columns, but
my query is coming back with 0 records.

I notice that when retrieving data from the tables, the column values come
back with spaces right filled onto the data - could this be why?

If I retrieve 'factory' from the table, I'll get 'ASDF ' --- If
this is really the cause of this, is there any way around having to append
all those spaces to each Where value??

Thanks!

Mike
 
---
Visit http://www.opennetcf.org
mikeb said:
I'm trying to do a select on my sqlce database -

Select * from myTestTable Where (factory = 'ASDF') and (trackno = 'XC')

I can see records with these values in the factory and trackno columns,
but my query is coming back with 0 records.

I notice that when retrieving data from the tables, the column values come
back with spaces right filled onto the data - could this be why?

If I retrieve 'factory' from the table, I'll get 'ASDF ' --- If
this is really the cause of this, is there any way around having to append
all those spaces to each Where value??


Fields are space-padded because you defined them as having fixed width. If
you use NVARCHAR instead of NCHAR, they would not be padded. Of course the
performance is better with fixed width fields. At least that's how it is on
the big database. Not sure it holds true on the devices
 
Back
Top