Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - UTF-8 - MemberAPI and more
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UTF-8 - MemberAPI and more

 Post Reply Post Reply Page  <12
Author
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2008 at 12:35pm
Yep - great idea - will test it and give you an update soon.

best regards
Sebastian
Back to Top
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2008 at 11:52am
Hi Bruce,

long time i did not visited your forums.

But the problem was existing all the time. Today it was the day to take a look again on my problem.
 
Finally i got it. Do not ask me for the reason. But the plain SQL Statements in memberAPI  you are using with ADODB.Connection do not transfer the username / values as UTF-8 (Windows Server 2003, SQL Server 2005, using OLEDB). As described above i tried a lot.

Solution: I used for the memberAPI instead of the plain SQL really stored procedures.

First i tried

strSQL = "exec NameOfProcedure '" & strUsername & ",;".

Did not work. i got no result. strUsername was passed as none UTF-8.

But with calling the stored procedure like:

RSApi__Username = strUsername
Set RSApi_cmd = Server.CreateObject ("ADODB.Command")
RSApi_cmd.ActiveConnection = dbconnectionstring
RSApi_cmd.CommandText = "{call dbo.proc_NAMEOFPROCEDURE(?)}"
RSApi_cmd.Prepared = true
RSApi_cmd.Parameters.Append RSApi_cmd.CreateParameter("param1", 202, 1, 30, RSApi__Username)
Set rsCommon = RSApi_cmd.Execute
RSApi_numRows = 0


the Username was given to the DB as UTF-8.

This i had to do with the looking for existing user and adding a new user. And i used it for the Update Statement on Author table within the memberApi too.

But then i had the problem again with the userCode / strUserCoder. And there is my last question: Is there a reason (i have to take care of why you are using the username in the usercode) too? In function usercode you have

strUserCode = strUsername & hexValue(10)

Then you use strUserCode often in WHERE Statements for the whole app. But there i end up in the same problem. The strUserCode had UTF-8 characters which where not working with ALL the where statements in plain SQL. I do not wanna to rebuild the whole application with stored procedures.

So im using now only the hexValue and not the Username anymore in the strUserCode. Question again:
Do i get there into trouble which i do not see right now?


As i thought - it will now be complicater more and more to follow the updates (thanks for the work!). But this is my problem LOL
Maybe would be a great idea to mark security updates in the release notes in red color. So i better see on which ones i have to take a eye on.

Thank you very much for the great app.
And sorry again for my bad english.
best regards and best wishes
Sebastian

Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.