很简单吗
db=>text
假定数据库字段定义如下:
id user pass定义自定义类型
type textdb
id as long
user as string*10
pass as string*10
end typeopen textfile
open database
open recordset
do until recordset.eof
  get current record
  textdb.id=id
  textdb.user=user
  textdb.pass=pass
  write textdb to textfile opened
loop
close recordset
close database
close textfiletext=>db
反向操作就可以了

解决方案 »

  1.   

    请问怎样把access数据库中的数据表转换成文本文件,表中的每一个字段在文本中用特定的格式区分开来,或反过来把文本中用特定的格式区分的数据转换成access数据库中的表。能否提供详细的源代码。谢谢!(注:不用导入导出的方法实现)
    例如:把文本中用“ and ”隔开的数据转换成数据库中相应字段的记录
    32022       and 42068625901013562101 and 李惠芳   and      75.25 and 0
    32023       and 42068625901013577401 and 高小毛   and       70.4 and 0
    32024       and 42068625901013583001 and 温太平   and      138.6 and 0
    72007       and 42068625901000853601 and 毛世友2  and      86.69 and 0
    反之,把数据库的字段转换成上述文本格式。请务必详细!
      

  2.   

    db=>text
    假定数据库字段定义如下:
    id user pass定义自定义类型
    type textdb
    id as long
    sp1 as string*5
    user as string*10
    sp2 as string*5
    pass as string*10
    end typedim sp as string
    sp="and"
    open textfile
    open database
    open recordset
    do until recordset.eof
    get current record
    textdb.id=id
    textdb.sp1=sp
    textdb.user=user
    textdb.sp2=sp
    textdb.pass=passwrite textdb to textfile opened
    loop
    close recordset
    close database
    close textfiletext=>db
    反向操作就可以了
    ----------------------
    其实,稍微转过弯一想就成了
      

  3.   

    在文本转换为数据库的过程中怎样把以 ” and ”分开的字符串,分别还原成数据库的字段。在数据库转换为文本的过程中怎样把文本中字符前的引号去掉。(问题没重复)