问题
I'm working on a database in access and I need to insert data into a table from a form when a button is clicked. Here is my code, but it didn't work.
Is the problem with my fields' names as it is Arabic?
Dim strInsert As String
Dim db As DAO.Database
strInsert = "INSERT INTO ÇáÍÖæÑ æ ÇáÇäÕÑÇÝ [(ÑÞã ÇáãáÝ )] values ('" & fileNO.Value & "');"
Debug.Print strInsert
db.Execute strInsert
Set db = Nothing
note: the undefined characters is the Arabic name
回答1:
There is no probleme with arabic, you've just to use utf-8 encoding when you create the Database.
CREATE DATABASE "myDataBase"
ENCODING = 'UTF8';
I've tried an insert request and it's work :
INSERT INTO test(id, data) VALUES (8888, 'أحمد');
回答2:
The simplest solution is to rename your field name temporarily to an English name (Latin letters).
Please avoid using non-Latin names in field names.
来源:https://stackoverflow.com/questions/40750789/my-field-name-is-arabic-and-didnt-work