Asp Ado
isprobival uje mnogo metodov, nikak ne mogu sdelat update v moey database
polu4au owibku :
"ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."
ispolzuyu takie inits:
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _ Server.mappath "iruron\dbirur.mdb")
set Conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.recordset")
Conn.Open sConnString
rs.ActiveConnection = Conn
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
KAK MOJNO IZMENIT DANIE V DB?
spasibo
Цитата:
Originally posted by Psy_After
kto znaet kak mojno sdelat UPDATE 4erez recordset v ASP ADO
isprobival uje mnogo metodov, nikak ne mogu sdelat update v moey database
polu4au owibku :
"ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."
ispolzuyu takie inits:
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _ Server.mappath "iruron\dbirur.mdb")
set Conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.recordset")
Conn.Open sConnString
rs.ActiveConnection = Conn
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
KAK MOJNO IZMENIT DANIE V DB?
spasibo
kto znaet kak mojno sdelat UPDATE 4erez recordset v ASP ADO
isprobival uje mnogo metodov, nikak ne mogu sdelat update v moey database
polu4au owibku :
"ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."
ispolzuyu takie inits:
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _ Server.mappath "iruron\dbirur.mdb")
set Conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.recordset")
Conn.Open sConnString
rs.ActiveConnection = Conn
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
KAK MOJNO IZMENIT DANIE V DB?
spasibo
filePath = Server.MapPath("iruron\dbirur.mdb ")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
Set Rs = oConn.Execute("SELECT * FROM ExamlpleTable”)
Rs("StringField1").Value= “newvalue”
Rs.Update()
Rs.Close()
Conn.Close()
filePath = Server.MapPath("iruron\dbirur.mdb") 'физический путь к базе
Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath 'открываем соединение
Set cR = Server.CreateObject("ADODB.Recordset")
cR.ActiveConnection = oConn
'выбираем все записи таблицы и все поля
cR.Source = "SELECT * FROM ExampleTable"
cR.CursorType = 3 'static
cR.LockType = 3 'optimistic
cR.Open 'открываем таблицу
cR("FieldName1").Value = 211 'меняем значение числового поля
cR("FieldName2").Value = "test" 'меняем значение текстового поля
cR.Update 'сохраняем изменения
cR.Close 'закрываем таблицу
oConn.Close эзакрываем соединение
p.s. давно с VB не работал, поэтому предыдущий пост получился кривым.