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 - Ubaidullah

Pages: 1 2 [3] 4 5 ... 9
31
Web Server - Ask For Help / Getting session variable in javascript
« on: February 22, 2021, 08:36:35 PM »
Hi Bruce,

I have a custom javascript file which displays some values on a NetWebForm.

Now, I need to use the session variable "language" to determine which values to display.

Since I cannot access the session variable from inside javascript, what would be the best way to get the value of "language" for my javascript code?

Thanks
&
Regards,
Ubaidullah Nubar.

32
Web Server - Ask For Help / Re: SQL Collation for multiple character sets
« on: February 11, 2021, 12:24:15 AM »
Bruce, thanks for the reply.

I did some further digging and found something curious.

Tested on SQL Server 2019/Win and it seems to exhibit better behaviour (previous test was on SQL Server 2017/Linux).

If I do an insert as above, it doesn't display correctly in the NetWeb app.

But, if I copy the text from Management Studio and paste into the NetWebForm, it displays correctly in the NetWeb app now.

So, I can see it as: el plátano, la banana

But, this is the curious thing:

After pasting as above, Management Studio now shows the text like this:
el plátano, la banana
instead of this:
el plátano, la banana

I am not too concerned about how it displays in Management Studio at this point.

Now, I need to figure out how to insert using T-SQL so the data displays correctly.

Obviously, inserting N'el plátano' is not working.

Does someone know how can I insert 'el plátano' and get 'el plátano' in Management Studio so it shows up correctly in the NetWeb app?

Thanks
&
Regards,
Ubaidullah Nubar.

33
Web Server - Ask For Help / Re: How to debug multihost GPF
« on: February 10, 2021, 05:45:27 AM »
Thanks for the input guys.

I solved the problem. The issue was WebHandler name was not set.

Now, it's working ok.

Thanks
&
Regards,
Ubaidullah Nubar.

34
Web Server - Ask For Help / Re: How to debug multihost GPF
« on: February 10, 2021, 12:32:06 AM »
SOLVED.

Turned out that I had not set the name for WebHandler for Site2.

Details:
I did some further digging into it with trace calls.

After the hostname is resolved, the code executes up to this point:

RESUME(START (_wsHandler, 35000, loc:OverString))

in the host WebServer proc.

But WebHandler of the app for Site2 never gets called.

This led to examining WebHandler and the resolution.

Hope this helps anyone else running into this issue.

35
Web Server - Ask For Help / How to debug multihost GPF
« on: February 09, 2021, 09:49:18 PM »
Hi,

I am running multihost with two sites loaded. Both show up as active and initialize correctly.

When I access site1, it works correctly.

When I access site2, host.exe throws an access violation error. How do I go about figuring out the cause of the error?

Site2 runs without GPF when running standalone as an exe.

Thanks
&
Regards,
Ubaidullah Nubar.

36
Web Server - Ask For Help / SQL Collation for multiple character sets
« on: February 08, 2021, 04:48:50 AM »
Hi Bruce,

What would be the correct approach to allow multiple character sets to be stored and displayed correctly in a Nettalk Web application?

I have a table where I need to be able to allow different languages like Spanish, Arabic in text fields. The text fields are of type nvarchar.

I insert some data into the table as below:

insert into Fruits (GUID, enFruitName, esFruitName, arFruitName)
values('126091FF-8301-42', N'Banana',N'el plátano, la banana', N'موز')

After the insert, it displays correctly in Management Studio as below:


But in my Nettalk web application, the fields display incorrectly as below:


Then I edit the data in my web application as below:


But the data still shows incorrectly now both in the web application and Management Studio:


In WebServer settings,
Charset is set to 'utf-8'
Store Data As is set to utf-8

What am I doing wrong and how can I store and display different character sets correctly?

Thanks
&
Regards,
Ubaidullah Nubar.

37
Hi,

Thanks for the suggestion.
I did as suggested. No difference.

Regards,
Ubaidullah Nubar.

38
Web Server - Ask For Help / Re: API Questions
« on: January 10, 2021, 01:21:23 AM »
Hi Leroy,

Calling the Google API is straightforward. You need to build the call as a url post in a NetWebClient procedure.

I haven't used the Outlook API so cannot comment much. If it is a Web API, it should be simple to call it too.

The complexity is not in the call but in building the calling url correctly and managing state and call sequence which differs from one API to another.

Regards,
Ubaidullah Nubar.

39
Web Server - Ask For Help / Locator Type Starts-With returns blank browse
« on: January 10, 2021, 12:05:10 AM »
Hi Bruce,

In a NetWebBrowse, I set the Locator Type of a column to "Starts-With" in the Sort tab of the column.

The browse shows correctly when the locator is blank. But as soon as I type anything, the browse goes blank.

The SQL code being sent has this WHERE clause when I type 'A' in the locator:

WHERE D.NAME >= 'A' AND D.NAME <= 'A'

Which obviously returns no results. This should be:

WHERE D.NAME like 'A%'


What am I doing wrong and how can I fix it?

ps. Is there an example for SQL that I can use to showcase SQL related issues?

Regards,
Ubaidullah Nubar.

40
Web Server - Ask For Help / Re: GUID and SQL Views
« on: November 24, 2020, 09:31:22 PM »
Thanks for the reply, Bruce.

Agree that this is more of an SQL question. But since I took the idea of using GUIDs from you, I wanted to ask you to see what you think of this.

Regarding multi-component keys, I remember sometime in the past, I faced some issues due to using Primary Keys with multiple fields but not sure exactly what it was.

So, I could make a composite GUID field which could be 32 or 48 characters in length. Although this would take up quite some space, it would work.

Regards,
Ubaidullah Nubar.

41
Web Server - Ask For Help / GUID and SQL Views
« on: November 24, 2020, 05:28:01 AM »
Hi Bruce,

I have started using GUIDs in all my tables and find the concept to be very useful especially when needing a "unique non-changing key".

I have a question about SQL views. I have NetWebBrowse procs on SQL views and they consist of aggregate data and hence there is no GUID available. For example a view defined as follows:

CREATE VIEW vwCustomerItemSales as
SELECT cust.GUID, item.GUID, min(cust.CustomerName), min(item.ItemSKU), min(item.Description), sum(inv.Qty), sum(inv.Amount)
FROM Customers as cust join Invoices as inv on inv.CustomerGUID=cust.GUID
                       join Items as item on inv.ItemGUID=item.GUID
GROUP BY cust.GUID, item.GUID


for tables Customers, Invoices and Items defined as below:

Customers:
GUID            varchar(16),
CustomerName    varchar(100)

Invoices:
GUID      varchar(16),
Qty       decimal(10,2),
Amount    decimal(10,2)

Items:
GUID           varchar(16),
ItemSKU        varchar(20),
Description    varchar(100)


What should I use for the unique key in this case?
I was thinking of combining cust.GUID and item.GUID which will give a STRING of length 32 characters.
But in some cases, there could be three GUIDs.

Appreciate your input on this.

Thanks
&
Regards,
Ubaidullah Nubar.

42
Web Server - Ask For Help / Re: XHTML - AsciiToUTF and nbsp
« on: November 22, 2020, 10:44:10 PM »
Thanks Don.

That worked well.

Regards,
Ubaidullah Nubar.

43
Web Server - Ask For Help / XHTML - AsciiToUTF and nbsp
« on: November 22, 2020, 10:10:41 AM »
Hi Bruce,

I have some code in the XHTML tab of a NetWebForm. The code contains "&nbsp;" in a few places to get the height of some elements correct.

But, the form does not display. If I remove the "&nbsp;", the form displays correctly.

It seems that the call to AsciiToUTF in the generated code does not like "&nbsp;".

Please advise how to embed "&nbsp;" in my XTHML code.

Regards,
Ubaidullah Nubar.

44
Web Server - Ask For Help / Re: Closing a tab with button
« on: November 19, 2020, 11:15:57 PM »
Thanks Alberto.

That worked.

Regards,
Ubaidullah Nubar.

45
Web Server - Ask For Help / Re: Adding text to in-row button
« on: November 19, 2020, 08:14:30 AM »
Bruce,

Thanks for the help in the webinar today.

Got it working by adding the following code to the "value::Viewnn" routine:

        p_web.site.SmallViewButton.jsIcon = ''
        p_web.site.SmallViewButton.Class = ' nt-nowrap'


Thanks
&
Regards,
Ubaidullah Nubar.

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