Browse


Author
Message
Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Here is the result

General Command Settings
Command Type: Text
Object Type: System.Data.SqlClient.SqlCommand
Connection String: Data Source=APOLLO\sql2005;Initial Catalog=payroll;Integrated Security=True;Persist Security Info=False;Asynchronous Processing=True
Transaction: False
Command Settings
CommandText: SELECT TOP 1000 [cu_pk_id], [cu_fk_sm_id], [cu_id], [cucode], [cutype], [cuname], [cuaddr], [cuadl2], [cucity], [custat], [cuzipc], [cubaddr], [cubadl2], [cubcity], [cubstat], [cubzipc], [cucraprvd], [cuterms], [cutdays], [cubuconame], [cubucophon], [cubucoextn], [cuapconame], [cuapcophon], [cuapcoextn], [cuauthot], [cuauthfone], [cufaxfone], [cu800fone], [cunextjo], [cufrstused], [culastused], [cucurbalnc], [cuo30balnc], [cuytdbilng], [cu90dbilng], [cucredlim], [cucredopn], [cucomment], [custateid], [sm_id], [cudispcnt], [cudisdays], [cuactid], [culastupdt], [cu_Use_Main] FROM [dbo].[customer] WHERE [cuname] LIKE @PARAM0;
Command Parameters
@PARAM0: A% (AnsiStringFixedLength)

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Next question Smile

If you create a query through the Enterprise Manager or SQL Management Studio, do you get any data back?  Are there any records that begin with "A"?  To prove this you can manually open your table and look or execute the query directly on the server.

To prove it you can copy the SELECT statement that is created and paste into the SQL Enterprise Manager or SQL Management Studio query window and replace the @PARAM0 with 'A%' and see if you get any results.  There is nothing wrong with the SELECT statement, so we need to investigate the server and the data a little more closely.

Let me know what you get.  Thanks Smile

Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Here what i get in Sql Profiler.

exec sp_executesql N'SELECT TOP 1000 [cu_pk_id], [cu_fk_sm_id], [cu_id], [cucode], [cutype], [cuname], [cuaddr],
[cuadl2], [cucity], [custat], [cuzipc], [cubaddr], [cubadl2], [cubcity], [cubstat], [cubzipc], [cucraprvd],
[cuterms], [cutdays], [cubuconame], [cubucophon], [cubucoextn], [cuapconame], [cuapcophon], [cuapcoextn], [cuauthot],
[cuauthfone], [cufaxfone], [cu800fone], [cunextjo], [cufrstused], [culastused], [cucurbalnc], [cuo30balnc],
[cuytdbilng], [cu90dbilng], [cucredlim], [cucredopn], [cucomment], [custateid], [sm_id], [cudispcnt], [cudisdays],
[cuactid], [culastupdt], [cu_Use_Main] FROM [dbo].[customer] WHERE [cuname] LIKE @PARAM0;
',N'@PARAM0 char(40)',@PARAM0='A%                                      '

Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Trent I can manualy retireve data if I change the @param to char(2) and remove the trailing spaces. It seems the parameter length is throwing it off

exec sp_executesql N'SELECT TOP 1000 [cu_pk_id], [cu_fk_sm_id], [cu_id], [cucode], [cutype], [cuname], [cuaddr],

[cuadl2], [cucity], [custat], [cuzipc], [cubaddr], [cubadl2], [cubcity], [cubstat], [cubzipc], [cucraprvd],

[cuterms], [cutdays], [cubuconame], [cubucophon], [cubucoextn], [cuapconame], [cuapcophon], [cuapcoextn], [cuauthot],

[cuauthfone], [cufaxfone], [cu800fone], [cunextjo], [cufrstused], [culastused], [cucurbalnc], [cuo30balnc],

[cuytdbilng], [cu90dbilng], [cucredlim], [cucredopn], [cucomment], [custateid], [sm_id], [cudispcnt], [cudisdays],

[cuactid], [culastupdt], [cu_Use_Main] FROM [dbo].[customer] WHERE [cuname] LIKE @PARAM0;

',N'@PARAM0 char(2)',@PARAM0='A%'

 

Or

 

declare @PARAM0 char(2)

SET @PARAM0 = 'A%'

SELECT TOP 1000 [cu_pk_id], [cu_fk_sm_id], [cu_id], [cucode], [cutype], [cuname], [cuaddr], [cuadl2], [cucity], [custat], [cuzipc], [cubaddr], [cubadl2],

[cubcity], [cubstat], [cubzipc], [cucraprvd], [cuterms], [cutdays], [cubuconame], [cubucophon], [cubucoextn], [cuapconame], [cuapcophon],

[cuapcoextn], [cuauthot], [cuauthfone], [cufaxfone], [cu800fone], [cunextjo], [cufrstused], [culastused], [cucurbalnc], [cuo30balnc],

[cuytdbilng], [cu90dbilng], [cucredlim], [cucredopn], [cucomment], [custateid], [sm_id], [cudispcnt], [cudisdays], [cuactid], [culastupdt],

[cu_Use_Main]

FROM [dbo].[customer]

WHERE [cuname] LIKE @PARAM0


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Nikki,

I see the problem.  This issue has been fixed and can be downloaded in the pre-release or if you wait another day we will have the "official" 1.4 released.  The problem that you are having is that your field is a fixed length string instead of a variable length field (i.e. VarChar).  When this happens, the field contents actually has spaces at the end, which produces a search that doesn't match.

We have already fixed this issue to take into account fixed length character fields.  If you want to fix to day, you can download the Pre-Release.  But it has been resolved and this is why we have been chasing our tails BigGrin

Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Well at least I know I'm not crazy Smile Well at least not about this.

After looking at the trace i thought the issue was because of the Field type so changed it to see what would happen and bingo it worked as advertised. Glad it is resolved in the new build.

By the way great framework glad to see something like this in .Net. I have been showing it off like a new car. I plan on re-writing / converting a  fox 2.6 app with this so talk about bells and whistles to the current users.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I never thought for a minute that you were "crazy" Smile.  I know exactly where you are coming from though.  It is always nice to find out that it's not you BigGrin.

Nikki, I am truly excited about having you as a new user.  Thank you for your kind words.  We too are excited about the framework and its future.  It is users like you that makes it all worth while!

StrataFrame is a great tool to migrate forward for VFP users.  Let me know if you need any help on that front.  Thanks again.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search