Question about Oracle 10g Database Standard (ODBSEONUPP0)

1 Answer

About visual basic coding

How to writ the code in visual basic to create database in Ms Access

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    MVP:

    An expert that got 5 achievements.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Contributor
  • 40 Answers

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

Posted on Jan 24, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

I want to learn that how can i connect my HTML page with my DATABASE created in MS ACCESS so that i can fill my table in HTML page directly-


1. You can use Pages option in MS Access. The page in MS Access is the web page in MS Access which allows you to access database in MS Access database.

2. You can use MS Office Front Page application and use the Form builder and connect your database in that.

3. You can also use Google Apps Business Solution for this however the database will not remain in MS Access but will remain in Docs online.

4. You can use .net application developer for this as well but needs expertise in that.

Mar 09, 2010 | Microsoft Office Standard for PC

1 Answer

What is run time error '-2147467259(80004005)' how i solved it rewati nadan


"The Microsoft Jet Database Engine cannot open the file '(unknown)'"There are several causes for this error message:
  • The account that Microsoft Internet Information Server (IIS) is using (which is usually IUSR) does not have the correct Windows NT permissions for a file-based database or for the folder that contains the file.
  • The file and the data source name are marked as Exclusive.
  • Another process or user has the Access database open.
  • The error may be caused by a delegation issue. Check the authentication method (Basic versus NTLM), if any. If the connection string uses the Universal Naming Convention (UNC), try to use Basic authentication or an absolute path such as C:\Mydata\Data.mdb. This problem can occur even if the UNC points to a resource that is local to the IIS computer.
  • This error may also occur when you access a local Microsoft Access database that is linked to a table where the table is in an Access database on a network server.
Resolution
  • Check the permissions on the file and the folder. Make sure that you have the ability to create and/or destroy any temporary files. Temporary files are usually created in the same folder as the database, but the file may also be created in other folders such as the WINNT folder. For additional information about how to identify which folder does not have the correct permissions and how to configure temporary files, click the following article number to view the article in the Microsoft Knowledge Base: 253604 (http://support.microsoft.com/kb/253604/ ) Microsoft Access 97 database connectivity fails in Active Server Pages If you use a network path to the database (UNC or mapped drive), check the permissions on the share, the file, and the folder.
  • Verify that the file and the data source name (DSN) are not marked as Exclusive.
  • The "other user" may be Microsoft Visual InterDev. Close any Visual InterDev projects that contain a data connection to the database.
  • Simplify. Use a System DSN that uses a local drive letter. If necessary, move the database to the local drive to test.
  • Follow the instructions in the following article to work around this problem: 189408 (http://support.microsoft.com/kb/189408/ ) FIX: ASP fails to access network files under IIS 4.0 and IIS 5.0

Oct 16, 2009 | Microsoft Access 2003 for PC

2 Answers

MS Access 2007 freezes when opening a basic TABLE. Please assist in resolving this frustrating problem.


You might try the "Compact and Repair" database option first before working on the database. Click on the "Office Button", then click on "Manage", then select "Compact and Repair Database". The usage dialog from there is straightforward. One that'srun, try opening the database again and opening the table as well.

Jul 15, 2009 | Microsoft Office Standard for PC

1 Answer

How to create a program using ms access?


you need to study the basics of database programming. take short courses for database programming.

Dec 04, 2008 | Microsoft Access 2002 for PC

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

Creation of a dynamic web page


Okay, you can't do that with just Office 2003 professional. You'll need to install and configure the dotnet framework on your machine first, and then you could use infopath to create forms to work with, say, something like MS Sharepoint. You could use MS Frontpage to create an online form and link it with an Access database, but you will not need the dot net framework for that. It's easy and Frontpage is pretty intuitive.

Here are the basic instructions for using MS Frontpage: http://office.microsoft.com/en-us/frontpage/HP052812481033.aspx

You will also need webspace or a webhost that will support Microsoft ASP web hosting.

If you haven't done this before, it may be easier to get a professional do it for you, using either Microsoft or PHP/MySQL based technologies. It will certainly be time efficient.

Oct 18, 2008 | Microsoft Office 2003 Basic Edition...

1 Answer

Coding in ms word by using visual basic editor


Hello Kavita! If you want to get the most of VB then i advice that you install Microsoft visual studio...But just in case you want it for free you can find it here..
http://www.brothersoft.com/downloads/vb6.html

Nov 10, 2007 | Oracle 10g Database Standard (ODBSEONUPP0)

2 Answers

What is a .sdf file? How to generate a .sdf file using ms access?


Regarding what is .SDF -- A file format that is compliant with the combination of SQL Server 2005 Compact Edition, SQL Server 2005 and Visual Studio 2005 to build, test, deploy, and manage applications for users. Databases of this type can be accessed directly as a datasource, e.g., from Visual Studio 2005, or from SQL Server Management Studio. As such, they can be passed around with programs or projects, although they are mainly used for embedded applications. The file includes all necessary code points to access the data, and so does not require an instance of SQL Server to be installed.

You can create a .SDF file with a software called PocketSYNC. (Although i have never tried it myself, a lot of people claim that this software works like charm. But it is not free)

Oct 17, 2007 | Oracle 10g Database Standard (ODBSEONUPP0)

1 Answer

Ms access


Stored Procedures don't exist in MS Access. You do have the following options though. Queries, which are just select or action queries. VB Code, which you can write using Query Objects as if you were writing a Visual Basic application. These can be Functions or Subroutines. In these, you would use the standard programming techniques with while and for loops, etc.

You can create complex situations combining the two of these. A function in the VB code area can accept through parameters, the single values (line by line, record by record) in a query and act on them and manipulate the values.

For example: create a query that does a select phone from address. Create a function in vb called public function StripDashesInPhone(Phone as string) which then uses VB coding to strip dashes from each phone value passed in. To make it all work, in the query on one of the field columns put "NewPhone: StripDashesInPhone([Phone])" and for every record processed in the query, the function is called with the [Phone] field value passed in to the function and the action is processed and returned.

Other than writing a function that is activated by a form button click, which opens the current db and opens a table and process it, just like in VB, this is about as close to cursors and oracle procedures as you get.

I wish it was more, but ...

Oct 09, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Oracle 10g Database Standard (ODBSEONUPP0) Logo

231 people viewed this question

Ask a Question

Usually answered in minutes!

Top Oracle Business & Productivity Software Experts

robertmoore1

Level 2 Expert

179 Answers

Fred Block
Fred Block

Level 2 Expert

289 Answers

cwradio73

Level 3 Expert

899 Answers

Are you an Oracle Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...