Android Question Passing non-english data to ASP/MDB database

Shay

Well-Known Member
Licensed User
Longtime User
Hi
I am using this in order to send data to asp page, and then the data is insert into MDB (access) database

the problem that if the data I send is not in english, I see in the table only "????"

this is the B4A code:
B4X:
Dim Post As HttpJob
    Post.Initialize ("Post" , Me)
    Post.Download (MyServerAddress & "/MissingWords.asp?Name=" & name & "&FileName=" & fname)

and this is the ASP code

B4X:
<html>
<head>
<title>Update Entry Select</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<body bgcolor="white" text="black">
<%
'Dimension variables
Dim adoCon          'Holds the Database Connection Object
Dim MyRS    'Holds the recordset for the records in the database
Dim strSQL          'Holds the SQL query for the database
            'Create an ADO connection object
Dim Name
Dim FileName
 
Name=Request.QueryString("name")
FileName=Request.QueryString("FileName")
           
Set adoCon = Server.CreateObject("ADODB.Connection")
 
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("MissingWords.mdb")
 
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
 
'Create an ADO recordset object
Set MyRS = Server.CreateObject("ADODB.Recordset")
 
If Name <> "" then
  strSQL = "INSERT INTO Words(Word, FileName) VALUES ('" & Name & "', '" & FileName & "')"
end if
 
MyRS.Open strSQL, adoCon
 
'Reset server objects
' if Name="CLOSEDB" then
  MyRS.Close
  Set MyRS = Nothing
  Set adoCon = Nothing
' end if
%>
ok
</body>
</html>

Any idea what & where is the issue?
 

Shay

Well-Known Member
Licensed User
Longtime User
b.t.w
I dont have access in the server for adding odbc or files in specific folder
(it is web sever in which I can put scripts/files in specific places)
so the solution (connection to DB) must be script based as I did in the above example
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
URL issue
did what you suggested, see the data in the table (not "?" but gibrish)
 

Attachments

  • MissingWords.zip
    14.4 KB · Views: 239
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
after some investigation the solution is to add the following to the asp page:
B4X:
<% @ codepage=65001 %>
<% Response.Charset= "utf-8"
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
Regarding the RDC, it there a way to implement it without creating odbc / edit local files
but using script solution?
 
Upvote 0
Top