database - An example of the file structure dbf -
i have short example on how generate dbf files
i saw following link: data file header structure dbase version 7 table file
i write program c #
for example, want produce following table( binary ):
field name type maxlength ------------------------------------------- dsk_id character 100 dsk_adrs numeric 2
are trying create table within foxpro (visual foxpro) itself?, dbase, or .net/java language. tabs unclear getting into, , creating table via low-level not way go.
i can modify answer more, suggest edit question provide more detail.
the basic syntax, if using visual foxpro like.
create table sometablename ( dsk_id c(100), dsk_adrs n(2,0) ) but again, need more on environment plan on working with.
by knowing want via c#, start downloading microsoft's vfp oledb provider.
then, can @ many other links connecting, querying (always parameterize) , execute need. here short example connection , create table want. querying, inserting, updating needed.
oledbconnection oconn = new oledbconnection("provider=vfpoledb.1;data source=c:\\somepath"); oledbcommand ocmd = new oledbcommand(); ocmd.connection = oconn; ocmd.connection.open(); ocmd.commandtext = "create table sometablename ( dsk_id c(100), dsk_adrs n(2,0) )"; ocmd.executenonquery(); oconn.close(); now, note, "connection" string has data source. should point path location want create and/or query tables. can have 1 connection points folder has 100+ tables , can query of them. again, going other questions can find lots of answer sampling... example, search on
vfp oledb c# , plenty of hits
Comments
Post a Comment