Question about Microsoft Computers & Internet

1 Answer

Create access mdb file by vfp code

Can I get sample codes for creation of access mdb file?
for example ,I want to make a table into a mdb database by code using vfp(visual foxpro).

I wait a happy respond.

My email: korea77@nate.com

Posted by on

  • korea77 Oct 15, 2008

    Can I get sample codes for creation of access mdb file?
    for example ,I want to make a table into a mdb database by code using vfp(visual foxpro).

    I wait a happy respond.

    My email: korea77@nate.com

×

Ad

1 Answer

Try this

#define dbLogical 1
#define dbNumber 2
#define dbInteger 3
#define dbLongInteger 4
#define dbCurrency 5
#define dbSingle 6
#define dbDouble 7
#define dbDateTime 8
#define dbBinary 9
#define dbText 10
#define dbOLEObject 11
#define dbMemo 12
#define dbReplication 15
#define dbDecimal 16
if file("C:\accesstest.mdb")
delete file c:\accesstest.mdb
endif
public oAccess
oAccess = createobject("Access.application")
oAccess.visible= .t.
newMDB = oAccess.NewCurrentDatabase("C:\accesstest")
newtable = oAccess.CurrentDb.CreateTableDef('testtable')
with newtable
.fields.append(.CreateField("Field1", dbLogical))
.fields.append(.CreateField("Field2", dbNumber))
.fields.append(.CreateField("Field3", dbInteger))
endwith
oAccess.CurrentDb.TableDefs.append( newtable)
dbc2Convert = "\\tpdfiles\data\dfreeman\tip\data\rta\rta"
open database (dbc2convert)

dbgetprop(rta,"table",)

After it runs you will need to close the MDB and reopen it.

Posted on Oct 30, 2008

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya Technician can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repair professionals here in the US.
click here to Talk to a Technician (only for users in the US for now) and get all the help you need.
Goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

7 Answers

How do I easily repair corrupt or inaccessible Access database file?


Why to depend on anyone else suggestion. You may download one of the best access recovery tool which will repair your inaccessible access database file. This tool work on windows 10 & below versions also best thing is that free version of this tool will preview all your records after repairing your database. So you may preview your database and can easily review that your data is recovered and to export it you have to use full version. Try this access recovery tool. Access Recovery Tool Repair and Manage MDB or Accdb Database Files

Sep 09, 2015 | Computers & Internet

6 Answers

I need to perform access database repair


The repair method attempts to recover only the tables, indexes and queries in the database. Do not attempt to repair damaged forms, reports, macros and modules. Before executing the Compact and Repair tool, please ensure the following condition:

1. Do not Open Access database must closed
2. Sufficient storage space available - minimum double in size of your Access database on that Disk.
3. Close the .mdb file related to .ldb file before you delete the .ldb file.
4. Then Run the Compact and Repair tool

Read more about Access Repair Toolbox
On:- http://www.access.repairtoolbox.com/

I tried lots of the suggestions and eventually found that this page was the most helpful http://www.filerepairforum.com/forum/microsoft/microsoft-aa/access/1385-%E2%80%8Bhardly-corrupted-access-2007-database

Feb 28, 2015 | Microsoft Office Access 2007 for PC

8 Answers

Access database 2003 problem with a copy of database file. How to fix?


You say corrupt, in what way exactly? Do you get any specific error numbers/messages?

Have you tried Access repair program? Compact and Repair. If not, use it. But ensure that you made a backup, it is necessary because all the recovery tips can make the damage even worse.

Also try Jet Compact Utility. This tool created by Microsoft and it is much like Compact and Repair, but more successful in repairing.

If no one of above advice helps, then perhaps you need more powerful solution. In this case try to run a good third-party. I would recommend Recovery Toolbox for Access. It must help you. https://access.recoverytoolbox.com/

Feb 23, 2015 | Microsoft Access 2003 for PC

7 Answers

MS Access database recovery


Have you tried creating a NEW MDB, and then IMPORTING the objects from the Crashed/Corrupted MDB?

This will SOMETIMES serve to rescue most if not all of the corrupted entities .

Or:
You can try:
eRepair Access is a powerful Access database recovery solution for damaged *.mdb and *.accdb files created in Access 2000 and above. Having such a tool at hand immediately after a database file corruption incident may save you a great deal of time, nerve and, of course, an ample amount of money that would otherwise be paid to third-party recovery services. With eRepair Access, you don't need to depend on anyone and entrust your Access data (often quite sensitive) into somebody else's hands. You don't have to wait. You don't have to call it a day knowing that the damaged Access file will not be restored (if at all) until tomorrow. With eRepair Access, you can be back in the game within minutes!

For more information: http://access.erepairtools.com/

If doesn't help, look here: http://www.filerepairforum.com/forum/microsoft/microsoft-aa/access/933-ms-access-database-recovery

Feb 05, 2015 | Microsoft Office Professional 2007 Full...

7 Answers

How can i repair a damaged access database


There are some reasons which may damage your MS access database such as virus infection, software crash, accidental shutdown of system, unrecognized format of database, corruption of storage media etc. These issues are easy to overcome by using third party software of access database repair.you can try Kernel Access Database Recovery Software one of the best software in Data Recovery

For information you can visit here ...http://www.accessrecoverytool.net


Aug 23, 2010 | Microsoft Computers & Internet

1 Answer

Same as above really


Hi,
I have fixed my problem. I realised that the Microsoft Access Database DSN did not include the *.accdb driver. I deleted the existing DSN and created a new one. This allowed me to select the ODBC driver that worked for both file types.

I cameto realise that I was only having this problem on machines that have been upgraded to excel 2007 and not on machines with full virgin installations. On install both try to create the appropriate DSN but one with the same name already exists on the machines being upgraded and the creation fails.

I hope this helps others.

Jul 18, 2009 | Microsoft Excel for PC

2 Answers

Convert my database from dpf to mdb


Use access to import external data. It can read dbf and create mdb

Jan 06, 2009 | Microsoft Visual FoxPro Professional...

2 Answers

Visual foxpro to access


hi
you need to use a ODBC conexion to trasport your tables into table .dbf in fox

or

you need to copy tur tables to excel documents an then import in vfp

bye

Jan 05, 2009 | Microsoft Visual FoxPro Professional...

1 Answer

Code for find the Ms access database size using visual basic


The way to get the database size is to point to the directory that the database is do a DIR statement with an output to a file as in DIR payroll.mdb>dbsize.txt and then read from the text file, the first field of the second line being the name (which you really don't need) then the size value of the database.

To import the text files using VB 8 use

'Imports System.Data.OleDb Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\path\filename.mdb") Dim cmd As New OleDbCommand("SELECT * INTO [import] FROM [Text;Database=d:\path;Hdr=No].[dbsize.txt]", conn) conn.Open() cmd.ExecuteNonQuery() conn.Close()

Nov 10, 2008 | Microsoft Office Standard for PC

1 Answer

About visual basic coding


Hello,
The standard way of creating a database using VBA, which can be modified to suit your needs is this--> Note: the code (wspDefault.CreateDatabase("Newdb.mdb"...), can be altered to save the database in a folder  such as "C:\NEWDB\text.mdb". sub NewDatabase()     Dim wspDefault As Workspace, dbs As Database     Dim tdf As TableDef, fld1 As Field, fld2 As Field     Dim idx As Index, fldIndex As Field     Set wspDefault = DBEngine.Workspaces(0)     ' Create new, encrypted database.     Set dbs = wspDefault.CreateDatabase("Newdb.mdb", _         dbLangGeneral, dbEncrypt)     ' Create new table with two fields.     Set tdf = dbs.CreateTableDef("Contacts")     Set fld1 = tdf.CreateField("ContactID", dbLong)     fld1.Attributes = fld1.Attributes + dbAutoIncrField     Set fld2 = tdf.CreateField("ContactName", dbText, 50)     ' Append fields.     tdf.Fields.Append fld1     tdf.Fields.Append fld2     ' Create primary key index.     Set idx = tdf.CreateIndex("PrimaryKey")     Set fldIndex = idx.CreateField("ContactID", dbLong)     ' Append index fields.     idx.Fields.Append fldIndex     ' Set Primary property.     idx.Primary = True     ' Append index.     tdf.Indexes.Append idx     ' Append TableDef object.     dbs.TableDefs.Append tdf     dbs.TableDefs.Refresh     Set dbs = Nothing End Sub
Hope this helps! Please let me know if you have any questions.Thank You,Raph30

Apr 10, 2008 | Oracle 10g Database Standard (ODBSEONUPP0)

Not finding what you are looking for?

Open Questions:

0 Answers

What is Microsoft office applications? Microsoft office is a set of interrelated desktop applications, servers, and services, collectively referred to as an office suite, for Microsoft Word: a word processor included in Microsoft Office and some editions of the now-discontinued Microsoft Works Microsoft Windows and macOS operating systems. Microsoft Excel: a spreadsheet. Microsoft released the first version of Excel for the Mac OS in 1985, and the first Windows version (numbered 2.05 to line up with the Mac) in November 1987. Microsoft PowerPoint: a presentation program used to create slideshows composed of text, graphics, and other objects, which can be displayed on-screen and shown by the presenter or printed out on slides. Microsoft Access: a database management system for Windows that combines the relational Microsoft Jet Database Engine with a graphical user interface and software development tools. Microsoft Access stores data in its own format based on the Access Jet Database Engine. Microsoft Outlook: a personal information manager that replaces Windows starting in Office 97, it includes an e-mail client, calendar, task manager and address book. Microsoft OneNote: a notetaking program that gathers handwritten or typed notes, drawings, and audio commentaries. Notes can be shared with other OneNote users over the Internet or a network. Microsoft Publisher: a desktop publishing app for Windows mostly used for designing brochures, labels, calendars, greeting cards, business cards, newsletters, website, and postcards. Microsoft Project: a project management app for Windows to keep track of events and to create network charts and Gantt charts, not bundled in any Office suite. Microsoft Visio: a diagram and flowcharting app for Windows not bundled in any Office suite

Dec 28, 2017 | Microsoft Computers & Internet

Computers & Internet Logo

Related Topics:

953 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2909 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18411 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...