Optimize Insert To Access DB

Nov 28, 2006

Hi,

I'm using access tables to store my data. to retrive data I use jet odbc engine in c++.

I want to insert a large amuont of records (about 20 mega records) to my database in the fasts way i can. if i use sql syntax (insert into table ()....) it's takes for ages (about 500 records per second).

if i'm writing a csv file and then use import (via access) it's much faster but here I have two problems
1.I dont know how to use the access import tool from c++.
2.I dont think I can distributie the access import tool with my product.

so my questions are :
1. Does any know any tool that insert records in an optimize way?
2. How can I use the access import tool in c++?
3. Can i use the jet engine to import csv files?

thank ishay

View Replies


ADVERTISEMENT

Optimize An Access Application Size

Jan 1, 2008

Hello everyone,

I've just finished my access application, but its size is 4 Mb. I expect that it will be much bigger once users begin to add records.

What is the best way in Access to keep the size of the file as small as possible?

Many thanks in advance,
Regards,

View 8 Replies View Related

Optimize Mail Merge With MS Access

Feb 11, 2008

Currently there is a MS Word application that runs a MS Access query to generate data for the Mail Merge with a document.

Does anyone have a suggestion as to how this process can be optimized? Specifically, looking to reduce the amount of time required to produce letters (best practices).

Thanks.

View 1 Replies View Related

Optimize Query

May 14, 2007

I have a query in ms access. (It is used to simulate inventories under (s,q) policies(not really important)).
It is used on a big table(1.000.000 entries), with data on ship dates and quantities of about 70.000 parts. It adds to the 4 columns one extra columns, with the usage in the leadtime prior to the ship date of the specific part number. It works, but it is too slow. I can only run it within 10 minutes if I leave a number of parts out of the table simulatie. Does anyone have an idea how to optimize it, so that I can include all parts?
sql:
SELECT simulatie.product_nr, simulatie.date, simulatie.customer, simulatie.usage, Sum(simulatie_1.usage) AS usagetotal
FROM simulatie AS simulatie_1 INNER JOIN simulatie ON simulatie_1.produkt_nr = simulatie.produkt_nr
WHERE (((simulatie_1.date) Between [simulatie].[date]-[simulatie].[leadtime] And [simulatie].[date]))
GROUP BY simulatie.produkt_nr, simulatie.date, simulatie.customer, simulatie.usage;

Note that the query works only on a single table.

Any help would be appreciated!

ps. version:Ms access 2002

View 7 Replies View Related

Queries :: How To Optimize A Query Expression

Jan 18, 2015

how to optimize a query expression. I have the below query that determines the employees rate, based on which bracket their total income falls into. I'm concerned that I have not writting this expression in the most efficient manner.

SepEmployeeIncomeTaxRate: IIf([SepEmployeeTotalIncome] Between [Sep_Txl_TaxGroup1_Min] And [Sep_Txl_TaxGroup1_Max],[Sep_Txl_TaxGroup1_Rate],IIf([SepEmployeeTotalIncome] Between [Sep_Txl_TaxGroup2_Min] And [Sep_Txl_TaxGroup2_Max],[Sep_Txl_TaxGroup2_Rate],IIf([SepEmployeeTotalIncome] Between [Sep_Txl_TaxGroup3_Min] And [Sep_Txl_TaxGroup3_Max],[Sep_Txl_TaxGroup3_Rate],IIf([SepEmployeeTotalIncome] Between [Sep_Txl_TaxGroup4_Min] And [Sep_Txl_TaxGroup4_Max],[Sep_Txl_TaxGroup4_Rate],IIf([SepEmployeeTotalIncome] Between [Sep_Txl_TaxGroup5_Min] And [Sep_Txl_TaxGroup5_Max],[Sep_Txl_TaxGroup5_Rate],0)))))

View 5 Replies View Related

Need Help To Optimize Performance On Linked Tables On A Network

Oct 13, 2004

I have a problem trying to improve performance on a database with linked tables across a network. I found in MS Access Help that you can do the following (see bullet below), but I have no idea how to use the OpenRecordset method. Can anyone give me an idea how to code this, or update the linked table with the information given below.

*You can greatly enhance performance when opening the main database and opening tables and forms by forcing the linked database to remain open. To do this, create an empty table in the linked database, and link the table in the main database. Then use the OpenRecordset method to open the linked table. This prevents the Microsoft Jet database engine from repeatedly opening and closing the linked database and creating and deleting the associated .ldb file.

I'd appreciate your help.


Thanks in advance,
JYMALY

View 1 Replies View Related

INSERT Data To MS Access Via SQL?

Dec 13, 2004

HI all-

I have a list of INSERT statements (SQL DML) and I wish to insert this data into an MS Access 2000 table

Unfortunately I cannot find a mechanism to accomplish this in Access. Does one exist? How can I import this data into access in a SQL format?

Thanks in advance!

View 6 Replies View Related

Insert SQL Error For Access

Sep 27, 2005

I keep getting the error Syntax Error in INSERT into statement. I don't know why

This is the sql statement:

Dim intRequest As Integer
Dim intRequest2 As Integer
Dim strSQL As String
Dim intInvoiceNumber As Integer
Dim strInvoiceDate As String
Dim strName As String
Dim intBalanceDue As Double
repeats:

If Paid.Value = -1 Then
intRequest = MsgBox("Now that you have checked this as been paid, do you wish to finalize this and become irreversable? (If you want further help about this click the Cancel button)", vbInformation + vbYesNoCancel)
If vbNo = intRequest Then
cancellation:
Paid.Value = 0
Call MsgBox("Request cancelled.", vbInformation)
Exit Sub
ElseIf vbYes = intRequest Then
' Perform action here
Invoice_Number.Enabled = True
Invoice_Number.SetFocus
intInvoiceNumber = Val(Invoice_Number.Text)
Invoice_Date.SetFocus
Invoice_Number.Enabled = False
strInvoiceDate = Invoice_Date.Text
Bill_To_Name.SetFocus
strName = Bill_To_Name.Text
strSQL = "INSERT INTO Paid-Address (Invoice-Number, Invoice-Date, Name, Balance-Due) VALUES ('" & Val(intInvoiceNumber) & "','" & strInvoiceDate & "','" & strName & "','32')"
Invoice_Number.Enabled = False
MsgBox (strSQL)
DoCmd.RunSQL strSQL
Else
intRequest2 = MsgBox("You have checked this invoice to be paid but if you don't finalize it, it be assumed an error or the cheque has bounced. If you finalize it in the other hand this invoice will be permenantly deleted from this record and entered into the paid summary instead. Do you wish to return back to the request message or do permenant cancellation?", vbInformation + vbYesNo)
If intRequest2 = vbYes Then GoTo repeats
GoTo cancellation
End If
End If

View 7 Replies View Related

Insert Records Into Access

Sep 6, 2004

hello,

I am trying to get a form to insert info into a access database. I am using dreamweaver 2004, i created the form with 4 text fields and a submit button. Ive added a ODBC connection and dreamweaver can qurery my table.

I added an insert record server behaviour, and i figured dreamweaver does all the work for you but when i saved and uploaded the page to my test server it would not submit and redirect to my chosen page, it only refresh the form.

Has anyone out there done this before and can notice a step that im missing.

Do i need to setup a recordset? because ive tried that as well and no success

help is much appreciated.

View 2 Replies View Related

Access Insert Into Problem, VBA

Nov 2, 2004

I have this line in my VBA program:
ssql = "INSERT INTO [tblEMPPROCESSING] ( [Procedure] ) SELECT [tblEmpGenProcStatus].[GeneralProcessingStatus] FROM [tblEmpGenProcStatus] where [tblEmpGenProcStatus].[ID]= " & ID & " and [tblEMPPROCESSING].[PositionID] = " & PositionID & ""
DoCmd.RunSQL ssql

It always pops up a window for me to type in [tblEMPPROCESSING].[PositionID]. I don't know why? Thank you in advance.

View 1 Replies View Related

Insert Trigger In Access

Jun 4, 2006

I am creating a student database in Access. I have connected a number of tables through primary keys with RI.

When I create a new record in the student table, I need to insert the student id manually in the grade table.

In SQL Server, I would use an insert trigger to do this automatically. How about in Access?

I need to get this new student id in a number of similar tables: scores, assessments, terms.

I have been populating the student table with data, exporting to access, importing as a new table, adding the id field, creating the relationship, then populating the table with the missing data, which is very labor intensive.

I have a lot more data to enter.

An easier way to do this in Access would be greatly appreciated.

Thanks,

Joe

View 7 Replies View Related

Ms Access Insert Problem

Sep 15, 2003

I have been using access for a while and never faced this problem.

When using access 2000, whenever i try to insert a row, access gives me a popup saying "about to append a row, are you sure" which i have to click yes to. For this reason, i can insert rows when in ms access. But when i try to do it through a JSP page that i have set up, an insertion never takes place.

How do i get around this?How do i get rid of the annoying popup?

I appreciate your help.

Thanks!

View 3 Replies View Related

Access Database Insert

Jan 30, 2008

I have a c# windows form application that inserts rows into an access database. Some values are decimal and access keeps rounding the values to the nearest whole number. How do I stop that behavior?

Thanks
t

View 3 Replies View Related

Trying To Insert JPGs Into Access

Jun 7, 2012

Keeping getting ole server is not registered when trying to insert jpg into access.

So, far have done the following.

Tried to repair Office install - no success.

Complete uninstall of Office, followed by standard install ( saw this as a possible fix).

Add of complete office components followed by:

Click on start and in the start search bar type CMD, right click on the command prompt icon in the programs area and then click on run as administrator.

At the command prompt type regsvr32 wmnetmgr.dll and then press enter. Successful

Made sure MSCOMCT2.OCX file is copied to c:windowssysWOW64 not c:windowssystem32
Regsvr "C:Program Files (x86)Common FilesMicrosoft SharedTriedit riedit.dll" Successful

Still receiving error when trying to insert jpg.

File on another db shows item as Package and right clicking on Packager Shell Object Object -> Activate Contents opens Windows Photo Viewer and displays photo.

View 1 Replies View Related

Insert MDF Database Into Access

Aug 24, 2012

From Excel VBA, how do you insert a ".mdf" database into Access say "Northwind.mdf".I tried:

Code:
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.Open ConnectionString:="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:pathNorthwind.mdf;"

[code]..

View 4 Replies View Related

Tables :: Use Insert Into Command To Insert Filepath Into Table That Adds Blank Label

Aug 28, 2014

I am at work, and I have acquired a database that prints labels. They now want the database to be coded so that after certain labels are printed the database will print a blank label. I have the code figured out as a Do While statement in order to print the blank label. The problem I am having is that I am trying to use the Insert Into command to insert the filepath into the table that adds the blank label.

|DoCmd.RunSQL "INSERT INTO Rod_tmakLabels ( Print, [Order] ) SELECT Yes AS Expr1, 'Rods Labels' AS Expr2"|

If I run the above command, it just adds the text "Rods Labels" at the end of the table. Is there anyway with the INSERT INTO command that I can insert the new label between the 2nd and 3rd row and add another row? Or is the command designed only to add a new row to the end? I haven't had any luck searching for this yet.

View 1 Replies View Related

How To Insert Images In Access Table

Nov 15, 2007

Hi all,

I am using Microsoft Access 2002. I would like to know how to insert images in Access table and retreive those data & images using Report.

I did change filed as OLE object. And try to insert object.

But I doesn't show at report.

Is there any other way to insert images in the table?

Please kindly help me.

View 3 Replies View Related

Help! Need An Access Guru UPDATE/INSERT INTO

Mar 11, 2005

I have an asp.net application where the user can add a new client name and password to a database, but I want to do a check to make sure that client name is not already in there. I was working with and INSERT INTO statement this here:

INSERT INTO [clients] ([clientName], [passWord]) VALUES (@clientName, @passWord) WHERE NOT EXISTS (SELECT [clients].[clientName] FROM [clients] WHERE [clients].[clientName] = clientName)

But I guess you can't use a WHERE clause with an INSERT statement.. So I am trying to use an UPDATE statement. This here:

UPDATE clients SET clientName = @clientName, passWord = @passWord WHERE NOT EXISTS (SELECT [clients].[clientName] FROM [clients] WHERE [clients].[clientName] = @test)

When I run it in access, it doesnt add a new row if I try to add a client name that is already in there, but if I try to add one that isn't it tells me it's going to UPDATE 13 rows which would be all the rows in there. Anybody have any ideas how I can do this?

View 2 Replies View Related

Insert Records Into Database Using Access And Asp

Feb 24, 2008

Hi, i quite new to programming.
I want to insert some values into the database.

This is my sql statement written in the asp page
Code:SQL= "INSERT INTO Login ([User], Pass,Info,GroupID,UserRootFolder,Email,IsDisabled, IsGroupAdmin,LanguageFile,AccountExpires) VALUES ('"& str_name & "','" & str_password & "','" & str_aboutUser & "'," 5 , &"''"&", '"& str_email & "', " 0 , 0 , english.dat, NULL)

The values 5, 0 , 0 and english.dat are the values i want to imput into the database. They are not variables. The rest will be variables.

This is the error i get

Code:Error Type:Microsoft VBScript compilation (0x800A0401)Expected end of statement/temasek/register_action.asp, line 12, column 200SQL= "INSERT INTO Login ([User], Pass,Info,GroupID,UserRootFolder,Email,IsDisabled, IsGroupAdmin,LanguageFile,AccountExpires) VALUES ('"& str_name & "','" & str_password & "','" & str_aboutUser & "'," 5 , &"''"&", '"& str_email & "', " 0 , 0 , english.dat, NULL)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

How do i write my sql statement

Thanks

View 3 Replies View Related

How To Insert A Line In Access Database

Jan 4, 2015

I am busy with an database in Access Control. I want to insert a line between 2 certain lines. How can I do that.

View 3 Replies View Related

Insert PowerPoint Presentation Into Access?

Dec 4, 2012

I have a database that multiple users open and enter data in on a weekly basis.

I have a powerpoint presentation that shows instructions on how to use the database for the users.

I would like to insert the powerpoint users guide into the main form so the user can click on it and read the instructions.

I am working in access 2010...

View 3 Replies View Related

Insert All Rows To Access Database

Oct 6, 2012

I use this vba code to insert data in access database 2007. It's working for one row, but when I try to use for more rows and columns give me "Type mismatch".

Code:
Sub Simple_SQL_Insert_Data()
Dim cn As ADODB.Connection '* Connection String
Dim oCm As ADODB.Command '* Command Object
Dim oWS As Worksheet

[code]...

View 5 Replies View Related

Reports :: Cannot Insert Line Chart Into Access

Sep 5, 2013

I can not get a line graph inserted into a report by using the Wizard. I have 2 columns of paired data that I want to graph. I dragged the 2 columns to the "Data" control in the wizard and changed summarizing for both columns from "sum" to "none".

When I look at the report in Print Preview, the data points are stacked vertically in the center of the graph and the "Series" box displays what looks like the data. If I add a Date/Time column as the X-axis, I am told that I have to summarize the data, something I don't want to do.

I've made various selections using the wizard and all fail.

View 3 Replies View Related

General :: Generate SQL Insert Statements From MS Access

Jul 26, 2012

i need to append data that is currently in a single MS Access table into multiple MYSQL tables that have primary keys and auto_ids etc. Therefore I need to run the queries in order so that I can use the new auto_ids correctly, see below:

INSERT INTO users (username, unconfirmed_email, password, agrees_with_terms, active, created, modified)
VALUES ("46", "", unix_timestamp(now()), 0, 0, now(), now());
SET @curr_user_id = LAST_INSERT_ID();
INSERT INTO accounts (type_id, status_id, profile_name, email, match_permissions, odesk, created, modified) VALUES (3, 0, "46", "", 1, 1, now(), now());
SET @curr_account_id = LAST_INSERT_ID();
INSERT INTO accounts_users (account_id, user_id, role_id, created, modified) VALUES (@curr_account_id, @curr_user_id, 1, now(), now());

is there a way i can change a single Access append query to generate the required insert statements to do this?

View 4 Replies View Related

Modules & VBA :: MS Access Insert Into SQL - Add Timestamp Column

Jan 12, 2015

I have the below SQL statement... In table2 there is another field called timestamp1... Is it possible to have the timestamp1 included in the below statement so that I will have a record of time the moment the records were inserted in table2? There is no timestamp1 field in table1.

Code:
strSQL = "Insert Into Table2(Business_Unit, Account) Select Business_Unit, Account From Table1"

View 1 Replies View Related

Queries :: Insert If Statement In Access Report

Jul 25, 2013

I want to insert an if statement in Access report that states.If the interviewer field is not null them put in the interviewer. If it is null then don't put anything.I have 5 of the interviewer fields and don't want empty lines in the report.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved