StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


««12

BrowseExpand / Collapse
Author
Message
Posted 04/20/2006 2:12:25 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 05/12/2006 5:35:50 PM
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)

Post #851
Posted 04/20/2006 2:23:44 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
Next question

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

Post #853
Posted 04/20/2006 2:28:05 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 05/12/2006 5:35:50 PM
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%                                      '

Post #855
Posted 04/20/2006 2:33:28 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 05/12/2006 5:35:50 PM
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

Post #856
Posted 04/20/2006 2:38:49 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
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

Post #857
Posted 04/20/2006 2:53:39 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 05/12/2006 5:35:50 PM
Posts: 13, Visits: 18
Well at least I know I'm not crazy 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.

Post #858
Posted 04/20/2006 4:19:41 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
I never thought for a minute that you were "crazy" .  I know exactly where you are coming from though.  It is always nice to find out that it's not you .

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.

Post #863
« Prev Topic | Next Topic »

««12

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:40am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.