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.


Topics - JPMacDonald

Pages: [1] 2
1
Web Server - Ask For Help / MS-SQL demon select statement
« on: April 03, 2016, 04:25:41 PM »
Hi Bruce,

I wanted to bump this in case it fell off your to-do list.
 
This one is bizarre and I’m still debating if it’s a Clarion or Nettalk issue.
The environment is Clarion 10.12104, MSSQL 2008-14, NT9.05
 
I’ve have an application running for several years with C9 and NT8.6x, it runs solid but when I tried converting it to the later C10 builds it blows out when doing a very specific PropSQL call on a TurboSQL table. With all the chatter on the news groups about SQL issues in the current releases of C10 I chalked it up to that, particularly as if I put the MSSQL DLL from build 11822 in place it works again.
 
I prepared an example to report to SoftVelocity but the sample desktop app ran fine with the same query. So I built a very stripped down NT9 app to do the same thing and it crashes every time.
 
In the attached zip file are the 2 example apps I created (no dictionary required) both are designed to execute an SQL statement using a internally defined TurboSQL file and return the result. It also contains a backup of the sample MSSQL database they are both accessing, you would need to restore this to an SQL server of course.
 
Compile both apps, the desktop client when run has a menu option named “Open Form”, it will automatically populate the fields with the connect string which you need to change for your server, and the problematic SELECT statement. If you click the Execute SQL button several times it will return a total amount. Other values in the table besides 3100 that can be used in the WHERE clause are 3300 and 8393.
 
Run the web app and the server will crash on either the very first or second execution of the SQL statement.
 
If you remove the WHERE clause it will run successfully multiple times without issue.
 
So a Clarion driver or an NT issue with the new Clarion driver?
 
Thanks for looking.
 
Regards
 
Parker

2
Hi folks,

I am using the shoestrap2 theme and in row buttons. This gives the Add/Change/Delete buttons a nice colour on the icon. When I add "other buttons" however there is no automagic colour added so they look greyed out as if they are disabled, but they are not disabled.

I'm using the alert, print, and calendar names in the Image CSS prompt field on the template. Is there a way I can use these icons but have them with some colour?

Regards

Parker

[attachment deleted by admin]

3
Web Server - Ask For Help / possible parser issue with jFiles
« on: July 01, 2015, 05:15:09 AM »
Hi Bruce,

Finally got the example working with Willie's original request and I apologize to him for hijacking that thread a bit.

A small oddity with the data has cropped up. I tried to append various pieces of the queue data to a text string and display it and unexpected line breaks occur which seem to be related to the last element in an json object.
Displaying this data causes the line breaks when using the "value" data:
 
"elements" : [
            {
               "distance" : {
                  "text" : "16.5 mi",
                  "value" : 26580
               },
               "duration" : {
                  "text" : "20 mins",
                  "value" : 1202
               },
               "status" : "OK"
            }
     ]

Processing this does not exhibit the line breaks:
notice the commas after the last value in the in each set which I don't think is a properly formatted json object

"elements" : [
            {
               "distance" : {
                  "text" : "16.5 mi",
                  "value" : 26580,
               },
               "duration" : {
                  "text" : "20 mins",
                  "value" : 1202,
               },
               "status" : "OK"
            }
     ]

So it seems the parser is adding a little something extra to the last field in an object.

Example attached.

Regards

Parker

[attachment deleted by admin]

4
The p_web.Redirect(...) appears to do a GET, is it possible to have it do a POST instead?
I'm trying to redirect to another site's page (within my own domain) and pass some values to it using POST.

Thanks

Parker

5
Hi Bruce,

I've modified Web12 (HotDates) to show the issue. I've added an Other button to the Users browse list that calls the CalendarBooking procedure as a popup.

Here are the steps:
1. Select the Users menu option.
2. Click on the new in-line button, 3rd one, the Bookings calendar opens in popup mode.
3. Close the Bookings page.
4. Click on the in-line Change button, then cancel that page.

Now all the in-line buttons and the Insert button are disabled.

Thanks for taking a look at this.

Regards

Parker


[attachment deleted by admin]

6
Hi Bruce,

When using the F10 Zoom box feature to enter something into one of the template fields it can drop characters and sometimes truncate entries. (C9 and C9.1 with NT 8.17)

If you go to any of the NT template entry fields and press F10 to open the zoom box and enter something like

'Heading ' & p_web.GSV('someField') & 'more text'  then save the entry.

Now press the F10 key again on that entry and you will see what you have entered is there, Click the red X in the upper right corner of the dialogue box to cancel and you will see that all of the & characters have been stripped out. On some fields, where I had a really long entry, it would get truncated as well as removing the & characters.

No fun trying to remember what I had in that field before it was altered and truncated ???

Thanks for looking.

Regards

Parker

7
Hi Bruce,

Not a bug per se but I'd like to hear your thoughts on this.

In testing a 7.3x app upgrade to 8.16 I had a form with a lot of check boxes and some other fields that I did not need/want a prompt for so I left that blank in the template and all was fine. When I opened the app using 8.16 it added a prompt for all of these fields that I think is the dictionary field name making the form not very pretty.

It seems to me that if NT 8.16 needs the prompt field filled in now it should at least honor the developer's original decision to have it blank but putting 2 single quotes there as opposed to the dictionary field name. That way the developer would not have to go back to every form and make that change by hand after the upgrade.

Perhaps the answer is that I should not have been so lazy to leave the prompt field empty in the first place but the template let me and that made it quicker to complete the entry for all these fields.

Your thoughts?

Regards

Parker

8
Hi,

I'm not sure if this is a change in behavior in C9.1 or NT 8.16.
I use the tip feature in the calendar control to show summary information when the user hovers over the appointment. The entries in the tip (where, when, who type data) is separated by the pipe character which breaks the data into separate rows, now under 8.16 & C9.1 it is just one long string including the pipe character.

I will continue to look for the fix but if someone has the quick answer I'd appreciate hearing about it.

Regards

Parker

9
In 8.16 the icon to close the form, which appears in the upper right hand corner, the "X" seems not to be aligned properly. See attached clip using chrome browser.

Regards

Parker



[attachment deleted by admin]

10
Hi Bruce,

Kicking the tires on NT 8.12 and ST 2.05.

A form I have working under NT 7.37 uses a time picture format of @t7b and works fine, but under 8.12 it won't accept the data I input.

Regards

Parker

11
Web Server - Ask For Help / BLOB field + TinyMCE not working on Insert
« on: April 08, 2014, 06:43:48 AM »
Hi Bruce,

I am using NT 7.37 + C9.0 + MSSQL 2005

I have a BLOB that is to hold email template code for later use in the system. I use the TinyMCE editor and created a local string variable to hold the data. I use the string slicing technique to move the data in and out of the BLOB to the local variable.

The problem is that the BLOB does not get updated on the initial Insert but works fine for subsequent updates.

Attached is an example app + dict, the connection string setting is in the INI file and I've included a script to build the SQL table.

Thanks for taking a look.

Regards

Parker


[attachment deleted by admin]

12
Web Server - Ask For Help / Double POST when compiled with C9
« on: November 09, 2013, 02:59:28 PM »
Hi Bruce,

I compiled an app used as a SOAP server using NT 7.28 with the latest C9 compiler and I get very odd results from the server. It looks like the incoming request happens twice, the first one is truncated and the second one seems complete but the data returned to the SOAP client is incorrect.

You can see this behaviour if you compile the example SOAP server (42) and Client apps. Hit the Get Info button for a student and you will see 2 POST to the server, the first one being truncated.

I am at a loss to explain it but it sure broke my SOAP server.

When you get a chance could you take a look.

Thanks

Parker

13
Web Server - Ask For Help / Locator, multi field key tweaking
« on: June 30, 2013, 11:27:35 AM »
BACKGROUND:
I have a typical MSSQL table with LastName and FirstName columns and a key on that table made up of both fields. I want to be able to use the locator filed to allow the user to enter Smith, John and have it locate to the first John Smith in the table.

APPROACH:
Digging around a bit I dropped the following code in the "2 Before Browse Loop/ 11 Set Filter" embed and it does exactly what I want in terms of locating to the proper name in the table.

IF Loc:LocateField = 'PROSP:LAST_NAME'
   X# = INSTRING(',',Clip(loc:LocatorValue),1,1)
   IF X# > 0
      ThisView{prop:Filter} = 'UPPER(PROSP:FIRST_NAME) >= <39>' & LEFT(UPPER(CLIP(SUB(loc:LocatorValue,X#+1,30)))) & '<39>'
      loc:LocatorValue = Clip(SUB(loc:LocatorValue,1,X#-1))
   END
END

PROBLEM:
After the browse is refreshed and I am looking at the correct data if I press the Previous button it starts the browse at the first name in the table and not the names just prior to Smith. If however I press the Next button, which works as expected, and then the Previous button it all works as expected.

I am guessing it has to do with the FirstValue pointer but I cannot get a handle on it. Can anyone help with what other setting I have to play with in order to get this last piece of the puzzle working?

SOLUTION:
Your terrific and simple answer goes here  ;D


Thanks

Parker

14
Bruce,

I am having a number of  issues with a web application using MSSQL tables.

In the attached example I have 2 MSSQL tables, a Chart of Accounts (CoA) and GL Transactions (glTrans). They are related through the field called AcctNo. They both have a primary key consisting of a SQL identity column.

My goal is to show the Chart of Accounts in a browse and next to the Balance amount field I include an “Other” button that is to be used to drill down on a given row to see the details that make up the balance. When the drill down button is clicked I want to open a popup form that has a browse of the GL transactions (file loaded with totals) filtered by the AcctNo of the row that was clicked on. I am setting the filter by hand in the embed using Prop:SQLFilter (also tried Prop:Filter). When the user clicks on a row in the CoA I get the data for that record and set a session value that is to be used to filter the drill down form/browse.

Here are the issues I am hitting:

1.   When the CoA browse opens if you click on the drill down button immediately I get an Error 47 and the web server terminates. If however you open one of the rows for edit first and then cancel out of that form you can now click on the drill down button successfully, well except for the other problem.
2.   The other problem is that on the form that opens to show the GL details you get a different number of records when you open the form repeatedly. To reproduce, click on a row (not the drill down button) use AcctNo 2000-6100, then click on the drill down button. The first time it usually shows all the records. Close the form and click the button again, you may have to do this 3-9 times to see it but you will get a different number of records or sometimes no records at all.
3.   The 3rd issue is that you have to click on the row before you can click on the drill down button. It seems to me that any code placed in the “.. when button pressed” embed doesn’t fire until after the popup window closes so I cannot set the data for the filter there. Clicking on the button before clicking on the row uses the previously selected row as the target.

The attached example runs on port 88. The connect string for the SQL tables in set in the WebServer Init embed. This using NT version 7.6

Thanks for taking a look.

Regards

Parker


[attachment deleted by admin]

15
Web Server - Ask For Help / Conditionaly change the color of a browse cell.
« on: February 03, 2013, 09:15:17 AM »
Using NT 7.04

I want to change the color of the contents of a browse cell depending on whether the value of that cell is positive or negative, i.e. black or red.

On the CSS tab for that field I added the following to the Additional CSS Properties selecting color as the property to change and for the Value entered: CHOOSE(locAvailable < 0, ' red', ' red')

I specifically made both choices 'red' here as I was not getting the expected result. When I inspect the cell with Fire Fox I see:

<div id="div1722349161_div" class="RightJustify" style="color: #000000;">-1,089.52</div>

No matter what I try the color is always #000000.

Where am I going wrong?

Regards

Parker

Pages: [1] 2