Insert Into External Database

Feb 19, 2006

I am trying to move data in one table to a table in an external database and Access isn't playing ball. Supposedly you can use the 'IN' clause to link to an external database but if I put it in then I get 'Syntax error in INSERT INTO statement' and if I take it out it works fine not that, that is what I want. It's syntax seems to be defined like below at the MS website - jet reference???

I've also got a parameter that I'm trying to feed it, that is the path to the database, which is correct! c:helpcontent.mdb

Here's the query
INSERT INTO CONTENT_CLASSES IN '"+ @DBDir +"' ( PARENT_ID, CLASS_NAME, STATUS_ID, KEYWORDS, PRIORITY, LAST_CHANGED_BY, LAST_CHANGED_DATE, MULTIPLE_CONTENT )
SELECT A.PARENT_ID, A.CLASS_NAME, A.STATUS_ID, A.KEYWORDS, A.PRIORITY, A.LAST_CHANGED_BY, A.LAST_CHANGED_DATE, A.MULTIPLE_CONTENT
FROM CONTENT_CLASSES AS A;

View Replies


ADVERTISEMENT

How To Insert Data Into External Db

Apr 28, 2005

Hi experts. I want to learn how i can insert data in to external db using vba.
For example , i want insert table names in to the external db.
(A command button in a form )I be happy if some one show me how. Thanks

View 2 Replies View Related

Opening An External Database

Nov 14, 2006

This is probably very simple and I feel I should know how, but I'm drawing a blank. How can I launch an external database when I click on a button?

Thanks

View 1 Replies View Related

Append New From External Database

Apr 3, 2006

Hi there I'm attempting to import records from an external database without losing the records that I currently have.

Eg if I have 3 records in my main database and 5 in the external one, I only want to append the 2 missing records and leave the other 3 alone.

Ideally what I want to do is the below

SELECT * INTO table
FROM [MS Acess;DATABASE=\pathexternal_data.mdb].[table]
WHERE id NOT IN (SELECT id FROM table)

Any ideas where I'm going wrong with the above?

Thanks for your help!!!

Tony

View 4 Replies View Related

Open External Database?

Oct 3, 2006

I was wondering is there a way to open up another database from within a database? Not to combine but just to open another one up instead of looking for it on a drive....

View 2 Replies View Related

Import Table From External Database?

Apr 23, 2013

Using access 2010. Trying to set up an import table from an external database.

Code:
DoCmd.TransferDatabase acImport, "Microsoft Access", "Y:DevTestFolder2013 01 Some Data Name", acTable, "tblName", "tblName"

I get an error 3024 could not find the file Y"DevTestFolder2013....

The database I am importing from is a 2003 .mdb

I tried the brackets because the file has spaces in it but still get the same error.

View 5 Replies View Related

Keep Database Secure By Disallowing External Import

Nov 1, 2005

I've made an access project (ade) and stored the admin with password in the ade file.
When I open a new database I can use the import feature to import all tables with definitions and data from the ade file. All other objects are being locked.

How can i disallow tables from my mde to be imported into another access application?

View 1 Replies View Related

Unexpected Error From External Database Driver

Jun 14, 2006

I am getting this error message:
"Unexpected Error from External Database Driver" when I try to import some .dbf files into Access. I just did some quick research, and it was suggested that I remove or rename the borland driver. Not sure how I feel about attempting that, plus, where do I get a new borland driver once the old is removed/renamed.

View 1 Replies View Related

Changing Database Names In External Queries

Nov 19, 2004

I have a database that I used as a back-end for an Excel spreadsheet. Now that the database has been moved from one place on the network to another, I need to update the information in my spreadsheet to reflect the database's new name and location. Is there any way of doing this short of deleting and recreating the queries in Excel?

View 2 Replies View Related

General :: Change Link From One External Database To Another?

Feb 26, 2013

I've got an Access 2010 application that currently links to a SQL Server 2000 database. I need to change the link to a SQL Server 2008 database on a different server. Where do I go to change the link? When I click on External Data, ODBC Database, I only get an option to import source data. I don't want to import any data. I just want the application to link to a different external database. If I go ahead and click OK, I choose my ODBC connection and log in to the 2008 database. Now I've got a list of "import objects" to choose from. I choose one table (just for testing; I actually want to link with all tables), it says it imported successfully, but when I view the data in that table from Access, it's the same old 2000 database data.

View 5 Replies View Related

Tables :: Import Table From External Database

Apr 23, 2013

Using access 2010. Trying to set up an import table from an external database.

Code:
DoCmd.TransferDatabase acImport, "Microsoft Access", "Y:DevTestFolder2013 01 Some Data Name", acTable, "tblName", "tblName"

I get an error 3024 could not find the file Y"DevTestFolder2013....

The database I am importing from is a 2003 .mdb. I tried the brackets because the file has spaces in it but still get the same error.

View 1 Replies View Related

Exporting Data To External Access Database?

Jan 23, 2015

code that will allow me to take data [All Fields] from a Table in my Database and Insert them into another identically structured Table in another MS Access accdb Database.I would also like to filter for records older than a month [MyDateField]

I have tried the following code I found on line. It doesn't throw an error . . . but it doesn't perform the Insert either.

Code:
Dim ws As DAO.Workspace 'Current workspace (for transaction).
Dim db As DAO.Database 'Inside the transaction.
Dim bInTrans As Boolean 'Flag that transaction is active.
Dim strSql As String 'Action query statements.
Dim strMsg As String 'MsgBox message.

[code]....

View 1 Replies View Related

How To Build Access Database From External Report

Oct 3, 2012

We have an older system that generates txt reports. I take these txt reports, then using Excel, I append the report headers to each record... creating a datatable. I then import this table to Access. I have not been able to figure out how to have Access perform this. In Excel, I use an "if" statement.

View 9 Replies View Related

Modules & VBA :: Linking External Tables To Current Database?

Mar 16, 2015

I was wondering if it was possible to link random external tables to the Active Database through VBA. I would like to run the code that would open up a dialog box that would let the user select the database as well as the tables within that database that the user can select to link to. I am able to select the database and but not able to select the actual tables. The tables will be random so I can't make a constant statement for a specific database.

View 1 Replies View Related

Queries :: Link External File To Existing Database?

Apr 30, 2013

Basically it's trying to take all the files in a given directory and add them into a existing database.

I have a database called Permit. the database has a field called "SEAL" and they will be creating an additional field "SCART" to hold the contents of the file that exist in the directory. Each image file, in directory, is named the same as a unique record in Permit.

example:
Permit-SC might have unique record 532442
An image file would be name 532442.

If the image file matches a record in Permit the image should be added to permit in a field called "SCART". At this point I'm not certain if I want a link or the actual image included in the record. since there's a possibility of including the permit file on the website it might be cleaner to have it included.

View 7 Replies View Related

Modules & VBA :: Transfer Database From Oracle Into External Access Db

Oct 26, 2013

i'm running a module from an access db. how do i import a table from oracle into a closed access db, not the one where the code is running from?

View 1 Replies View Related

Queries :: Calculating And Returning Values From External Database?

Jan 2, 2014

I have created a link to a CRM system that we have, and am using access as an interface for a specific task with the data contained within this CRM.

I have written a query that pulls to fields of data together but cannot get the two to calculate.

Within SQL server management studio I use the following query to give me a numerical response.

SELECTPRCPRICE,SUM(CAST(VL2BENEFICIALASNUMERIC (20,6))*CAST(PRCPRICEAS MONEY)))ASHOLDINGVALUE

Access doesn't appear to accept the cast functionality / how I can perform a similar functionality with access?

View 9 Replies View Related

Database External User Not On Same Server And Securing Info

Mar 6, 2015

Is it possible for me to give them access to part or all of the database so that they can run queries to target venue mailshots etc if so how would i do this?Secondly my concern is that the database is valuable and I want to protect myself from potential theft of info, ie what stops them taking the database and using it for there own purposes?

View 2 Replies View Related

Hide External Data And Database Tools Tabs From Access

Jan 17, 2015

I want to hide external data and databasetools tabs only from my access program. How i do it ?

View 3 Replies View Related

General :: Hide External Data And Database Tools Tabs From Access?

Jan 17, 2015

i want to hide external data and databasetools tabs from my access program.

how i do it ?

View 3 Replies View Related

Modules & VBA :: Automatically Attach External File To Email Generated By Access Database

Nov 24, 2014

I have an Access 2013 database which will generate a pdf report and attach it to an email using the code:

Code:
DoCmd.SendObject acSendReport, "Report Name", acFormatPDF, Nz(To email address, a), , , "Email Subject", "Email body", True

I would also like to automatically attach on the server to this email. Such a file stored such as servernamesharefilename.pdf. Is it possible to do this?

View 14 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

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

Insert Into Mdb From Selected Data From SQL Database

Sep 14, 2004

My application extracts data from a SQL server according to some filters and put it in a local database (MS Access), I actually do it in two steps, data extraction and loop tru the data sending it to MS Access with insert values instruction, is there a better way to do it (the routine is too slow for large databases, the string convertion make it slow I beliebe)?, I was thinking on something like "Select into", but I am not copying a database and I need to add 2 more columns to the database (add fields that you have at the moment to make the select but aren't on the database and were needed to make the selection).

Tanks

View 1 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







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