Re: Column Padding
- From: "Mike Bevins" <MBevins@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Sep 2007 09:18:33 -0400
Okay, I just compacted / repaired the DB and that did not help.
"Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx> wrote in message news:02C8E41F-2868-47BB-A3EC-9EC03E2B3A61@xxxxxxxxxxxxxxxx
Do you still have the problem if you do a Repair/Compact on the database? I don't know why adding a column should cause your select statement to begin failing unless the database has become corrupted. Do you get any error message, or does it just not return any rows?
--
Ginny Caughey
Device Application Development MVP
"Mike Bevins" <MBevins@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:47511ECE-8E30-4FBB-9BDB-484DE24B1691@xxxxxxxxxxxxxxxxI think I am getting closer to the cause of it. I upgraded the DB and then ran the sql (select * from table where device_id = '1966' ). I then modified the table using management studio (I added a column ID as a primary key with identity set to true and I begin having this problem.
"Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx> wrote in message news:605D2E1C-359F-4D8A-8CF6-6CA2DB2D9EC6@xxxxxxxxxxxxxxxxOk thanks.
--
Ginny Caughey
Device Application Development MVP
"Mike Bevins" <MBevins@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:0118A437-C0F6-45B7-BBC8-8540275A2E2D@xxxxxxxxxxxxxxxxI am using SQLCE 3.0
The data type is a nvarchar(10).
I am not 100% sure what you mean, basically to repoduce it, all I have to do is a select * from table where device_id = '1966' using the Query Analyzer 3.0 on the handheld or even when it is called from code on the handheld. Then if I copy the sdf to my desktop and then run the exact same query using management studio, it works fine.
As for creating the DB, I used the upgrade utility to convert it from 2 to 3.
"Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx> wrote in message news:B3474816-ACB1-43E7-92C1-4741583BB717@xxxxxxxxxxxxxxxxOne other question, is the data type varchar or nvarchar? Do you have a small sample that reproduces it including the part that creates the sdf file?
--
Ginny Caughey
Device Application Development MVP
"Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx> wrote in message news:748BD97E-2AA6-488B-AA6B-D88F7183C8FC@xxxxxxxxxxxxxxxxIs this with SQLce 3.1?
Thanks,
--
Ginny Caughey
Device Application Development MVP
"MikeB" <mdb@xxxxxxxxxxx> wrote in message news:eBIvz%23g%23HHA.3900@xxxxxxxxxxxxxxxxxxxxxxxYes it was a typo and I get nothing with Where device_id = '1966'.
ALso, this appears to be isolated to sql server on the mobile. When ran on the mobile, I get nothing, then when I copy the sdf to my desk top and run it from sql management studio it runs fine?
"Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx> wrote in message news:C0485AFC-8E32-4FCA-855B-08BD6C71D69F@xxxxxxxxxxxxxxxxMike,
Is the double quote a typo? What do you get with WHERE device_id = '1966' ?
--
Ginny Caughey
Device Application Development MVP
"MikeB" <mdb@xxxxxxxxxxx> wrote in message news:u1V2DIf%23HHA.1204@xxxxxxxxxxxxxxxxxxxxxxxHello All,
I just converted my 2.0 db to 3.0 and am running into problems where sqlce appears to be padding some of my columns which are varchars. For example my where clause "WHERE device_id = "1966" doesn't return anything while "WHERE device_id LIKE '%1966" and WHERE RTRIM(device_id) = "1966" does. I even checked the len by calling select LEN(device_id) and it did return 4.
What am I doing wrong? Can anyone help?
.
- Follow-Ups:
- Re: Column Padding
- From: Ginny Caughey [MVP]
- Re: Column Padding
- References:
- Column Padding
- From: MikeB
- Re: Column Padding
- From: MikeB
- Re: Column Padding
- From: Ginny Caughey [MVP]
- Re: Column Padding
- From: Ginny Caughey [MVP]
- Re: Column Padding
- From: Mike Bevins
- Re: Column Padding
- From: Ginny Caughey [MVP]
- Re: Column Padding
- From: Mike Bevins
- Re: Column Padding
- From: Ginny Caughey [MVP]
- Column Padding
- Prev by Date: Re: Column Padding
- Next by Date: Re: Column Padding
- Previous by thread: Re: Column Padding
- Next by thread: Re: Column Padding
- Index(es):
Relevant Pages
|