I am a newbie of Delphi,but I love it,so I try to learn it.
But,but I can not read Delphi help,because of it written by English.
I quest a example for operate Ms Vfp table by using Delphi,
please reply me!
I will add your score,I promiss.
Thanks all

解决方案 »

  1.   

    那你应该去看一看ConnectionString的写法,只是很罗嗦。
    如果你不知该怎样写,可以先用beta 的方法生成这个ConnectionString,然后打开来看,
    稍做改动就行了。比如在我的机器上生成的字串是这样的:
    Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft Visual FoxPro Driver};
         UID=;SourceDB=d:\my_data;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
    我只要在运行时把实际路径赋给 SourceDB 就行了,其他参数暂时不要理他:
    Var DBPath: String;
    DBPath:=//你的数据库路径;
    ADOConnection1.ConnectionString:='Provider=MSDASQL.1;'
                                      +'Persist Security Info=False;'
                                      +'Extended Properties='
                                      +'"Driver={Microsoft Visual FoxPro Driver};'
                                      +'UID=;'
                                      +'SourceDB='+ DBPath   
                                      +'SourceType=DBF;'
                                      +'Exclusive=No;'
                                      +'BackgroundFetch=Yes;'
                                      +'Collate=Machine;'
                                      +'Null=Yes;'
                                      +'Deleted=Yes;"';