NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Devan

Pages: 1 2 [3] 4 5 ... 16
31
Web Server - Ask For Help / Strange button behaviour in NT7
« on: September 30, 2013, 10:54:21 PM »
Hey all,

I have a NT7 web server running for a client, and I have an OrderDetailForm NetWebForm on there which contains a button that prints a PDF report out.  The Procedure that creates the PDF report is called 'WebOrderReport'.

I have defined a button which calls the procedure 'WebOrderReport' and has the Parameters:

'ID=' & Clip(OHD:ID) & '&OrderNumber=' & Clip(OHD:OrderNumber) & '&tflag=' & Clock()

I have also defined the Target Frame as "_blank_" so it opens in a new window without affecting the open order screen.

When testing here in house, everything works OK, and when the new browser window is opened with the PDF order displayed, I check the URL at it is:

http://blah.com/WebOrderReport?ID=xxx&OrderNumber=nnn&tflag=nnnnnn

The problem is, on the live site, the button only works about 50% of the time.  Most of the time they press the button, they are getting a browser 'Page Not Found' popping up.  I asked them to send me a screenshot, and I noticed on the failing screenshots, the URL is:

http://blah.com/WebOrderReport?__Referer__=http%3A//blah.com/OrderDetailForm?ID=xxx&OrderNumber=nnn&tflag=nnnnn

I am not sure what is appending the "__Referer__" bit to the URL.  It appears to be the URL of the calling Order Details page.

What would cause NT7 to mangle the URL like this?  I initially thought that perhaps the PDF was not being generated, but I've checked the temp folder where the generated PDF files are stored, and it certainly looks like they are being created correctly.

At a loss as to where to start looking for the source of the problem.  Especially seeing as I cannot seem to replicate it here in house.

Cheers,
Devan

32
Web Server - Ask For Help / Field validation on desktop vs mobile
« on: September 08, 2013, 11:17:57 PM »
We have a very specific login screen on one of our NT7 apps.  As well as the username and password on the login screen, there is a drop down box under those for the user to choose the company before they do a 'proper' login to the system.

Now, the list of companies that each user can select from is actually dependent on their login, and for this reason, we do a quick login check as soon as the user enters their password and the password field loses focus.

We accomplish this by putting some embed code in the LOC:Password Field -> Validate::LOC:Password Routine.

It works beautifully on the desktop versions of the site.  The embedded code gets called every time the user clicks anywhere else on the screen, including if they click on the drop down.  The validation code builds the drop down contents quickly based on their login name/password.

However - it doesn't ALWAYS work on the mobile version of the site there is about a 50/50 chance that the validation code does not get called.  I am assuming that this is because NT/jQuery handle taps on mobile screens differently to clicks/pressing the tab key on the desktop screen?

What is the best point to call the validation routines when the Password field loses focus on the mobile version of the site?

33
LOL... I better do a DIFF on the files then, so I can make the requisite changes after I install upgrades...  ;D

34
YES !!!!!!!!

This patch works - Thank very much for sending it through Bruce.

I assume that these changes will be incorporated in 7.19?

Thanks,
Devan

35
Hi Bruce,

Just tried 7.18 - same problem.  The CLIP() is still in the filter. :(

Cheers,
Devan

36
Hey Bruce,

Happy to test a 7.18 Beta if you like.  Project is at a standstill until I can resolve this, so it won't hurt to give it a shot.

Feel free to email me at:  devan (at) blaze (dot) com (dot) au with any instructions.

Cheers,
Devan

37
I've been doing some more testing on this.  Running TRACE.EXE shows that just the SQL portion is being sent to the back end regardless of whether the Locator field is filled in or not.  Here is a sample trace log:

Code: [Select]

01D40H(3) 09:25:10.282 Allocating Statement 0A796A0H on Connection 0A793C0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Setting Concurrency to Read Only for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Setting Cursor Type to Forward Only for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Resetting Parameters Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Preparing Statement 0A796A0H : SELECT  A.LOCATION, A.Code, A.DESCRIPTION, A.INSTOCKUNIT, A.PERMITREQD FROM dbo.VWProductMaster A WHERE ( (PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID='6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE')) And (Location='B') )  ORDER BY   A.DESCRIPTION,   A.LOCATION,   A.Code Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Setting number of rows to fetch to 1 for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Binding Column 1 to C type CHAR(4) for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Binding Column 2 to C type CHAR(23) for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Binding Column 3 to C type CHAR(41) for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Binding Column 4 to C type CHAR(7) for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Binding Column 5 to C type UTINYINT for Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.282 Executing prepared Statement 0A796A0H Time Taken:0.00 secs
01D40H(3) 09:25:10.288 Fetching Row from Statement 0A796A0H Return Code: 0 Time Taken:0.00 secs
01D40H(3) 09:25:10.288 NEXT(VIEW:BB327FC:dbo.VWProductMaster:0BB32484H)   Time Taken:0.00 secs
01D40H(3) 09:25:10.288  VPR:LOCATION: 'B'
01D40H(3) 09:25:10.288  VPR:FLD_CODE: 'CMOUNT00000.5AI'
01D40H(3) 09:25:10.288  VPR:FLD_CODE: 'CMOUNT00000.5AI'
01D40H(3) 09:25:10.288  VPR:DESCRIPTION : '.5 C-Mount RQ E71'
01D40H(3) 09:25:10.288  VPR:PERMITREQD : 00H
01D40H(3) 09:25:10.288  VPR:INSTOCKUNIT : ''
01D40H(3) 09:25:10.288 POSITIONfile(VIEW:BB327FC:dbo.VWProductMaster:0BB32484H)   Time Taken:0.00 secs


It looks like the Clarion part of the filter may be run on the client side?  Any ideas where to look or to trace that side of things?

38
Ok, from a process of elimination, it looks like the CLIP() function is what kills the query.  If I remove CLIP() from the function as you suggested, then the query works fine.

Interestingly, UPPER() seems to be IGNORED by the query.  If I try this:

'(SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID=''6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE'')) And (Location=''B''))) AND (instring('a',UPPER(VPR:Description),1,1))) <> 0)'

I still get descriptions returned with an 'a' in them, even though logically I SHOULDN'T get anything returned, because 'a' <> UPPER('a'), am I right?

Are these problems because VPR:Descripion is a STRING(40) instead of a CSTRING(41) ??  Or do I need to bind the functions again?

39
Thanks for the reply Bruce,

I removed the original filter, and the locator began working as it should have.  (Incidentally, the Location="B" bit is part of the whole SQL() filter).

What confuses me is the SQL() filter by itself works fine and filters the records as they should be.  It seems that when we add ' AND ' and a normal Clarion filter that it fails? 

Weird that this browse worked fine in NT6, but since the upgrade to 7 it is failing.  Are there any issues with combining an SQL and Clarion filter?  I didn't think there would be?

EDIT: Just did some more testing, and looks like there IS a problem with combining SQL and non SQL statements on the same line where the non SQL portion returns a numeric result?  I entered this filter in the Browse properties:

'(SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID=''6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE'')) And (Location=''B''))) AND (1=1)'

and it worked fine, so I changed the second part to:

'(SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID=''6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE'')) And (Location=''B''))) AND (LEN(CLIP(UPPER(VPR:Description))) <> 0)'

to just add a check for the length of the Description column, and I get zero records again. 

Then I changed the second part to:

'(SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID=''6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE'')) And (Location=''B''))) AND (SUB(VPR:Description,1,1) ='"B'')'

and it works fine, giving me all products starting with 'B'...

Very odd!



40
Hey Bruce,

Tested as you requested.  The SQL fields are in my dictionary as STRING fields.

With NO Locator, the filter string is as thus:

[15504] [netTalk][thread=3] BrowseVWProductMaster :: Filter: SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID='6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE')) And (Location='B'))


When I enter 'test' into the locator:

[15504] [netTalk][thread=3] BrowseVWProductMaster :: Filter: (SQL((PermitReqd=0 OR Code IN (SELECT ProductCode FROM DBRestrictedProducts WHERE CRMGUID='6BFEB8D2-8A10-DF11-8DF5-00215AAC8BCE')) And (Location='B'))) AND ( INSTRING('TEST',CLIP(UPPER(VPR:Description)),1,1) <> 0)


I seem to remember there was an issue with the test for INSTRING() returning zero for SQL databases in the past??

Cheers,
Devan

41
Hey all,

Just upgraded to 7.17 today and began work on an old NT6 project.

Got most of the other update issues out of the way, but for some strange reason, the Locator on my main NetWebBrowse just refuses to work.  Worked fine on NT6, but in 7 whenever I type in anything into the Locator field, it returns zero records.

The browse is only looking at about 7 columns from an MSSQL table that has about a thousand rows.

No matter which column I click to locate, it doesn't matter if I type in 1 character or the entire name in perfect case - no rows show up at all.

Any idea what could be causing this?

Thanks,
Devan

42
Ok - solved this one!

I had forgotten to 'refresh' the buttons in NT7 by deleting the old buttons in the WebServer procedure.

Yes, yes - read the change specs, I know.  I didn't and paid for it with 2 frustrating hours... Although I must say I READ them.  Just didn't FOLLOW them to the letter..  :P

43
As mentioned in a previous post, we've just upgraded a site from 6.x to 7.10 and the site consists of a very large Wizard form with 10 pages.

Lots of validation within the form, but it seems that the validation calls are not being made anywhere in the form at the moment.  Have I missed something with the conversion across?

EDIT: I changed the form to 'Tab' style and the validations work fine.  Changed back to 'Wizard' and nothing... :(

44
Web Server - Ask For Help / New File Upload issue in 7.1x
« on: June 30, 2013, 10:42:15 PM »
Hey Bruce and Co.

I just upgraded one of our sites to 7.10 today and while working on it, I noticed a strange (possible) bug with the new HTML5 upload controls.

Basically, if you specify more than one File Upload field on a form, the first one renders fine, but the second and subsequent ones on the page always have the [Start] [Clear] [Cancel] buttons after the [Add File] button.

I assume these buttons are only for multiple file uploads, but I have ensure that '1 file only' is checked in all the field parameters.  The buttons don't actually appear to DO anything, so I am assuming it is just aesthetic, but nevertheless, it is confusing my client no end! :)

NB: We have several upload buttons on a 10 page wizard form, and even on the other wizard pages, the buttons have the extras on them.  Only the first button on the first wizard page just has the [Add File] option as I require.

Cheers,
Devan

45
We've set up two NetTalk sites now using a local web SMS provider - www.smsbroadband.com.au

Of course, these guys are catered towards Australian users - we can send SMS messages to any Aussie mobile for about 5 cents.

They have a web api, and using NetTalk together with XFiles, I think it only took about an hour to set up the first site to send SMS's.  Second site took only a few minutes because we ported the same back end code across.  I was really surprised at how easy it was to do.

Pages: 1 2 [3] 4 5 ... 16