当前位置:首页
开发技术指南» 文章正文
    引言:

 ·mschart 使用问题    »显示摘要«
    摘要: 如下代码放在html文件显示正常,但迁移到aspx文件中,控件可以显示,但js调用时出错,显示"mschart1未定义",那位兄弟在asp.net中用过mschart?遇到过类似的情况吗? _______代码如下: <html> <head> <meta name="generator" content="mi......
 ·动态加载用户控件的问题    »显示摘要«
    摘要: control skin = page.loadcontrol("~/skin/default_skin.ascx"); placeholder1.controls.add(skin); repeater rpbclass = (repeater)skin.findcontrol("bclass"); 动态加载了这个repeater,但是我不知道怎么......


各位朋友如何在vb中操作dbf文件(dbaseIII)

请问各位朋友如何在vb中操作dbf文件,我这边的需求很简单,就是程序可以生成一个dbf文件,然后可以往里面添加点数据。  
   
  请问哪位朋友知道方法啊,或者有没有什么例子或参考。我用ado或者odbc,总出错,实在是痛苦。  
   
  谢谢了先

NO.1   作者: TechnoFantasywww.applevb.com)

如何用ADO打开DBF文件:  
  http://www.china-askpro.com/msg32/qa36.shtml

NO.2   作者: TechnoFantasywww.applevb.com)

dbf文件格式也比较简单,你可以通过分析dbf文件格式直接来生成dbf文件:  
  dbf文件格式  
  http://www.wotsit.org/download.asp?f=ti838d

NO.3   作者: happy_sea

DBF   FILE   STRUCTURE    
  ~~~~~~~~~~~~~~~~~~    
   
  BYTES       DESCRIPTION    
  00       FoxBase+,   FoxPro,   dBaseIII+,   dBaseIV,   no   memo   -   0x03    
                  FoxBase+,   dBaseIII+   with   memo   -   0x83    
        FoxPro   with   memo   -   0xF5    
        dBaseIV   with   memo   -   0x8B    
        dBaseIV   with   SQL   Table   -   0x8E    
   
  01-03       Last   update,   format   YYYYMMDD       **correction:   it   is   YYMMDD**    
  04-07       Number   of   records   in   file   (32-bit   number)    
  08-09       Number   of   bytes   in   header   (16-bit   number)    
  10-11       Number   of   bytes   in   record   (16-bit   number)    
  12-13       Reserved,   fill   with   0x00    
  14       dBaseIV   flag,   incomplete   transaction    
                  Begin   Transaction   sets   it   to   0x01    
        End   Transaction   or   RollBack   reset   it   to   0x00    
   
  15             Encryption   flag,   encrypted   0x01   else   0x00    
                  Changing   the   flag   does   not   encrypt   or   decrypt   the   records    
   
  16-27       dBaseIV   multi-user   environment   use    
  28       Production   index   exists   -   0x01   else   0x00    
  29       dBaseIV   language   driver   ID    
  30-31       Reserved   fill   with   0x00    
  32-n       Field   Descriptor   array    
  n+1       Header   Record   Terminator   -   0x0D    
   
  FIELD   DESCRIPTOR   ARRAY   TABLE    
  BYTES       DESCRIPTION    
  0-10         Field   Name   ASCII   padded   with   0x00    
  11       Field   Type   Identifier   (see   table)    
  12-15       Displacement   of   field   in   record    
  16       Field   length   in   bytes    
  17       Field   decimal   places    
  18-19       Reserved    
  20       dBaseIV   work   area   ID    
  21-30       Reserved    
  31         Field   is   part   of   production   index   -   0x01   else   0x00    
   
  FIELD   IDENTIFIER   TABLE    
  ASCII       DESCRIPTION    
  C               Character    
  D               Date,   format   YYYYMMDD    
  F               Floating   Point    
  G               General   -   FoxPro   addition    
  L               Logical,   T:t,F:f,Y:y,N:n,?-not   initialized    
  M               Memo   (stored   as   10   digits   representing   the   dbt   block   number)    
  N               Numeric    
  P               Picture   -   FoxPro   addition    
   
  Note   all   dbf   field   records   begin   with   a   deleted   flag   field.    
  If   record   is   deleted   -   0x2A   (asterisk)   else   0x20   (space)    
  End   of   file   is   marked   with   0x1A    
   
   
  有了这些资料,自己用binary方式建立一个dbf文件不是很简单吗?

NO.4   作者: standys2004

用ODBC就可以,简单

NO.5   作者: Leftie

Dim   conn   as   new   ADODB.Connection  
  conn.ConnectionString   =   "provider=msdasql;DRIVER=Microsoft   Visual   FoxPro   Driver;UID=;Deleted=yes;Null=no;Collate=Machine;BackgroundFetch=no;Exclusive=No;SourceType=DBF;SourceDB=C:\fox\data;"  
  conn.Open  
 


 ·怎样读取这样一个文本文件    »显示摘要«
    摘要: 怎样读取类似这样一个文本文件? 格式如下: 001/12.1 002/24 003/42.5 004/45.6 008/75.3 015/456 120/62.3 总之就是 序号/数值(浮点类型) 怎样读入一个 序号数组char numb[][4]和 数值fvalue[] 数组中? 用cfile类打开操作。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE