rcdmk / aspJSON

A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
MIT License
203 stars 89 forks source link

test.asp error #30

Closed marceloanuch closed 7 years ago

marceloanuch commented 7 years ago

Hi, I'm from Chile. I try the last version of asp json, great work. I install on my windows 2012 server but test.asp give me a error on jsonObject.class.asp line 983, invalid LCID, Response error 'ASP 0219 : 80004005'

Thanks for any help, regards.

rcdmk commented 7 years ago

Hi.

This error means your server doesn't have the English (en-US) LCID available.

As per MSDN website, you have to enabled this through Regional and Language options:

The locale group has to be installed on the Web server before its locale identifier can be specified in a Web page or application. Use the Regional and Language Options control panel application to install locale groups.

On hosting providers where servers are set to English, this will work out of the box and you will not have any problems.

marceloanuch commented 7 years ago

Hi Ricardo,

(Hablas español?) I find the error, first I install LCID English and make it default on my windows, now I have a English Windows. But, the error back again.

I see source code and I find the error:

Line 223 actualLCID = Response.LCID Line 225 Response.LCID = 1033

I change line 225 to 223 and 223 to 225 and now Work fine, please can you see if the answer is correct on: http://dev.medialink.cl/json/test.asp http://dev.medialink.cl/json/test.asp

Coordialmente, Best Regards,

Marcelo A. Anuch Medina Consultor de Empresas Público/Privadas Ingeniero Comercial, MBA UDD Business Management

🔒 La información contenida en esta transmisión es confidencial y está dirigida exclusivamente a el o los destinatarios indicados. Cualquier uso por otras personas que no sean sus destinatarios está sancionado por la ley chilena. Si ha recibido esta transmisión por error, por favor destrúyala y notifique al remitente si corresponde. Las opiniones expresadas en este correo son las de su autor y pueden no ser compartidas por la compañía. Marcelo A. Anuch Medina, no asume obligaciones ni responsabilidades por el contenido de este correo. Tampoco garantiza que la transmisión de este correo sea segura o libre de errores, y en consecuencia, no responde por virus, pérdidas, destrucción, recepción tardía o incompleta.

🍀 Antes de imprimir este correo electrónico asegúrese que sea realmente necesario: Cuidemos el medio ambiente! Todos vivimos en un solo planeta.

El 23-01-2017, a las 23:12, Ricardo Souza notifications@github.com escribió:

Hi.

This error means your server doesn't have the English (en-US) LCID available.

As per MSDN website https://msdn.microsoft.com/en-us/library/ms524330(v=vs.90).aspx, you have to enabled this through Regional and Language options:

The locale group has to be installed on the Web server before its locale identifier can be specified in a Web page or application. Use the Regional and Language Options control panel application to install locale groups.

On hosting providers where servers are set to English, this will work out of the box and you will not have any problems.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rcdmk/aspJSON/issues/30#issuecomment-274680874, or mute the thread https://github.com/notifications/unsubscribe-auth/AIiv6Y2J7RluNi3lNekR_RwEr1BX1imiks5rVV3xgaJpZM4LroiR.

rcdmk commented 7 years ago

Hi Marcelo.

I'm from Brazil and my home language is Portuguese. I can understand some words in Spanish, but I prefer to use English if you don't mind.

These 2 lines are in correct order. The goal is to get the current server LCID, store it, change it to en-US and restore it to the original value after the operations.

The lib works on my machine and many servers I've tried.

Please, try the following, one at a time, alone:

Best.

marceloanuch commented 7 years ago

Hi,

Session.LCID work fine.

Look my code:

<% Session.LCID = 1033 %>

<!DOCTYPE html>

ASPJSON

Lectura de datos para tratamiento con JSON

<% dim jsonObj, jsonArr set jsonObj = new JSONobject set jsonArr = new jsonArray ' load records from an ADODB.Recordset dim cn, rs set cn = CreateObject("ADODB.Connection") cn.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=rac_mackenna; UID=root;PASSWORD=nbg2016; OPTION=16384" set rs = cn.execute("SELECT * FROM t_tipos_pagos ORDER BY tipo ASC") While not rs.eof jsonObj.LoadRecordset rs jsonArr.LoadRecordset rs rs.movenext Wend rs.Close cn.Close set rs = Nothing set cn = Nothing jsonObj.defaultPropertyName = "Custom" jsonObj.Write() response.write vbLf jsonArr.Write() %> It not change de jsonObj Name, you can see result at http://dev.medialink.cl/json/test.asp I want to use asp classic with Kendo UI, and Kendo work with json Coordialmente, Best Regards, Marcelo A. Anuch Medina Consultor de Empresas Público/Privadas Ingeniero Comercial, MBA UDD Business Management 🔒 La información contenida en esta transmisión es confidencial y está dirigida exclusivamente a el o los destinatarios indicados. Cualquier uso por otras personas que no sean sus destinatarios está sancionado por la ley chilena. Si ha recibido esta transmisión por error, por favor destrúyala y notifique al remitente si corresponde. Las opiniones expresadas en este correo son las de su autor y pueden no ser compartidas por la compañía. Marcelo A. Anuch Medina, no asume obligaciones ni responsabilidades por el contenido de este correo. Tampoco garantiza que la transmisión de este correo sea segura o libre de errores, y en consecuencia, no responde por virus, pérdidas, destrucción, recepción tardía o incompleta. 🍀 Antes de imprimir este correo electrónico asegúrese que sea realmente necesario: Cuidemos el medio ambiente! Todos vivimos en un solo planeta. > El 24-01-2017, a las 12:30, Ricardo Souza escribió: > > Hi Marcelo. > > I'm from Brazil and my home language is Portuguese. I can understand some words in Spanish, but I prefer to use English if you don't mind. > > These 2 lines are in correct order. > The goal is to get the current server LCID, store it, change it to en-US and restore it to the original value after the operations. > > The lib works on my machine and many servers I've tried. > > Please, try the following, one at a time, alone: > > Add a page declaration to the page you are getting this error on <@ LCID="1033" @> > Set Session.LCID = 1033 before using the class > Set the default LCID setting on IIS ASP options > Best. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub , or mute the thread . >
rcdmk commented 7 years ago

Hi again.

Hum... I will take a look at the default property problem (#32) and close this issue.

marceloanuch commented 7 years ago

Thanks ;)

Coordialmente, Best Regards,

Marcelo A. Anuch Medina Consultor de Empresas Público/Privadas Ingeniero Comercial, MBA UDD Business Management

🔒 La información contenida en esta transmisión es confidencial y está dirigida exclusivamente a el o los destinatarios indicados. Cualquier uso por otras personas que no sean sus destinatarios está sancionado por la ley chilena. Si ha recibido esta transmisión por error, por favor destrúyala y notifique al remitente si corresponde. Las opiniones expresadas en este correo son las de su autor y pueden no ser compartidas por la compañía. Marcelo A. Anuch Medina, no asume obligaciones ni responsabilidades por el contenido de este correo. Tampoco garantiza que la transmisión de este correo sea segura o libre de errores, y en consecuencia, no responde por virus, pérdidas, destrucción, recepción tardía o incompleta.

🍀 Antes de imprimir este correo electrónico asegúrese que sea realmente necesario: Cuidemos el medio ambiente! Todos vivimos en un solo planeta.

El 24-01-2017, a las 19:02, Ricardo Souza notifications@github.com escribió:

Hi again.

Hum... I will take a look at the default property problem (#32 https://github.com/rcdmk/aspJSON/issues/32) and close this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rcdmk/aspJSON/issues/30#issuecomment-274953406, or mute the thread https://github.com/notifications/unsubscribe-auth/AIiv6Wue1Lb304grQ9zPPTGP-DPmpDotks5rVnT2gaJpZM4LroiR.