L?I: "l?i c php trong CHN vo..." trn ADO Recordset.Update

D?ch tiu ? D?ch tiu ?
ID c?a bi: 189220 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?


Khi b?n g?i phng php AddNew, v sau g?i phng th?c C?p Nh?t c?a m?t RecordSet, l?i sau y ?c tr? l?i:
Microsoft OLE DB Provider cho tr?nh i?u khi?n ODBC l?i '80040e21'
[Microsoft][i?u khi?n ODBC Microsoft truy c?p 97] L?i c php trong CHN vo tuyn b?.
S? d?ng tr?nh i?u khi?n ODBC Microsoft truy c?p version4.00.4202.00 ho?c sau ny, cc thng bo l?i l:
Th?i gian ch?y l?i '-2147467259(80004005)':
[Microsoft][ODBC Microsoft Access Driver]L?i c php trong CHN vo tuyn b?.


X?y ra l?i ny n?u sau y l ng:
  • CursorType l adOpenForwardOnly (0).
  • CursorLocation l adUseServer.
  • M?t l?nh v?c ?c C?p Nh?t c m?t khng gian trong tr?ng tn.
  • B?n ang s? d?ng tr?nh i?u khi?n Microsoft Access ODBC.
Ku g?i cc phng php AddNew v C?p Nh?t, m?t Server-Side, ch? c chuy?n ti?p con tr? chu?t, l m?t ho?t ?ng khng h?p l?. ActiveX Data Objects (ADO) b ?p cho l? h?ng m? ny b?ng cch t?o ra m?t tuyn b? CHN ? th?c hi?n thao tc. Khi ADO t?o ra tuyn b? CHN, n khng delimit l?nh v?c tn. V? v?y, l?nh v?c tn c ch?a m?t khng gian t?o ra l?i c php.

V d?, m?t tuyn b? CHN h?p l? s? nh sau:
   INSERT INTO Table ([field with space]) Values(value)
ADO t?o ra m? sau y:
   INSERT INTO Table (field with space) Values(value)


D?i y l m?t s? ngh? quy?t c th?:
  • Khng s? d?ng khng gian trong cc l?nh v?c tn trong c s? d? li?u c?a b?n.
  • S? d?ng m?t CursorLocation adUseClient (3).
  • Khng s? d?ng m?t CursorType adOpenForwardOnly (0), ch?ng h?n nh adOpenKeyset (1), adOpenDynamic (2) ho?c adOpenStatic (3).
  • Th?c hi?n thao tc b?ng cch t?o ra tuyn b? CHN c?a ring c?a b?n, v?i delimiters trn cc l?nh v?c tn, thay v? s? d?ng AddNew v C?p Nh?t phng php.
  • S? d?ng cc Microsoft OLE DB Provider cho phin b?n my bay ph?n l?c 3.51 ho?c 4,0 thay v? c?a cc Microsoft OLE DB Provider cho ODBC v tr?nh i?u khi?n ODBC Microsoft truy c?p.


Microsoft ? xc nh?n i?u ny l m?t l?i trong cc s?n ph?m c?a Microsoft ?c li?t k ?u bi vi?t ny.

Thu?c tnh

ID c?a bi: 189220 - L?n xem xt sau cng: 20 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
T? kha:
kbbug kbdatabase kbdriver kbjet kbmt KB189220 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:189220

Cung cp Phan hi


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com