S seeip Unregistered / Unconfirmed GUEST, unregistred user! 2007-01-31 #1 http://www.delphibbs.com/delphibbs/dispq.asp?lid=3662504 试了一下,可用,但是数据库有密码怎么办?
S steven7581 Unregistered / Unconfirmed GUEST, unregistred user! 2007-01-31 #2 access数据库默认用户名:admin,一般加的密码就是它的密码,用ADO的方式联入。
V vvyang Unregistered / Unconfirmed GUEST, unregistred user! 2007-01-31 #3 极易: uses ComObj; //db:数据库名(完整路径);usr:用户名;pwd:密码;oldtbl:旧表名;newtbl:新表名 procedure RenameTable(const db, usr, pwd, oldtbl, newtbl: WideString); var cat: OleVariant; begin cat := CreateOleObject('ADOX.Catalog'); cat.ActiveConnection := 'Provider=Microsoft.Jet.OLEDB.4.0;User ID=' + usr + ';Data Source=' + db + ';Persist Security Info=False;Jet OLEDBatabase Password=' + pwd; cat.Tables[oldtbl].Name := newtbl; cat := Unassigned; end;
极易: uses ComObj; //db:数据库名(完整路径);usr:用户名;pwd:密码;oldtbl:旧表名;newtbl:新表名 procedure RenameTable(const db, usr, pwd, oldtbl, newtbl: WideString); var cat: OleVariant; begin cat := CreateOleObject('ADOX.Catalog'); cat.ActiveConnection := 'Provider=Microsoft.Jet.OLEDB.4.0;User ID=' + usr + ';Data Source=' + db + ';Persist Security Info=False;Jet OLEDBatabase Password=' + pwd; cat.Tables[oldtbl].Name := newtbl; cat := Unassigned; end;
S seeip Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-01 #4 你的这个是修改表名,看了你的另一个答案是修改字段名的.