hi i am trying to import access tables into my backend database( current database) which is sql server.
i created file browser which browse access database from harddrive and places all the tables into listbox. and upon clicking table name in list box, i want it to import it to my current database( which is sql server).
in order i used this code:
Private Sub ListTables_Afte rUpdate() docmd.TransferD atabase acLink, "Microsoft Access", dbname, acTable, Me.ListTables, Me.ListTables
docmd.TransferD atabase acExport, "ODBC Database", "ODBC;DSN=dsnna me;LANGUAGE=us_ english;DATABAS E=currentdbname ", acTable, Me.ListTables, Me.ListTables
End Sub
this thorws an error saying" the expression you entered is wrong data type for one of the argument" and point to first line
and without linking i guess it suppose to import to you current databse by just importing access tables.
Private Sub ListTables_Afte rUpdate()
docmd.TransferD atabase acImport "Microsoft Access", dbname, acTable, Me.ListTables, Me.ListTables
End SUb
it still thorws same error.
i am sure i selected same database.
and listbox name is 'listtables'
help m eout here..
2 2548 MMcCarthy 14,534
Recognized Expert Moderator MVP
If I understand you correctly you want to export the tables from your current database which is MS Access to SQL Server. You can't do it this way.
Look into using the Access upsizing wizard. Go to the tools menu - database utilities - upsizing wizard. If that doesn't work you will have to import the tables from SQL Server in which case I will move this question to that forum.
Let me know how your get on.
ADezii 8,834
Recognized Expert Expert
hi i am trying to import access tables into my backend database( current database) which is sql server.
i created file browser which browse access database from harddrive and places all the tables into listbox. and upon clicking table name in list box, i want it to import it to my current database( which is sql server).
in order i used this code:
Private Sub ListTables_Afte rUpdate() docmd.TransferD atabase acLink, "Microsoft Access", dbname, acTable, Me.ListTables, Me.ListTables
docmd.TransferD atabase acExport, "ODBC Database", "ODBC;DSN=dsnna me;LANGUAGE=us_ english;DATABAS E=currentdbname ", acTable, Me.ListTables, Me.ListTables
End Sub
this thorws an error saying" the expression you entered is wrong data type for one of the argument" and point to first line
and without linking i guess it suppose to import to you current databse by just importing access tables.
Private Sub ListTables_Afte rUpdate()
docmd.TransferD atabase acImport "Microsoft Access", dbname, acTable, Me.ListTables, Me.ListTables
End SUb
it still thorws same error.
i am sure i selected same database.
and listbox name is 'listtables'
help m eout here..
How about using DTS (Data Transformation Services) within SQL Server?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Campbell's List |
last post by:
Hi,
I'm completely new to MySql and need help importing tables from Access or
Dbase. I am using Dreamweaver MX to create a data-driven web site. With the
VPS hosting plan we're on, our remote FreeBSD server only supports the PHP
application server. PHP requires MySql. Thus, I installed a copy of MySQL
Control Center 0.9.2 beta. (I prefer a GUI and not command prompts unless
necessary.)
The information I plan on using in developing...
|
by: Sujeet |
last post by:
Hey guys,
I want to import a database from SQL Server 2000 to MS Access with all
indices and keys along with the tables. DTS does not export indices
and keys, only the structure and the data.
When used "Import External Data" through Access(linking through ODBC)
it creadted liked tables, however with indices and keys. Can remove
these links and preserve only th stucture back. How do I do it.
Thanks
|
by: Mark |
last post by:
All,
As you can see below, I have had problems with inquisitive souls looking
at data they shouldn't be. I though disabling the ability to create new
databases using my workgroup would stop this but it doesn't. All they have
to do now is create a new database using the default wrkgroup, close it and
then open it again whilst joined to my workgroup and they can import again.
Can someone please help me stop these people importing from the FE...
|
by: Brenda |
last post by:
How can I change the name of a table as I import it?
I have a form in Access that needs to accept files from different
sources (mainly dBase III). I need one field out of these tables,
called ZIP, that I can run queries on. I want to import this Zip
field into a holding table to run the queries on. This will be a
frequent thing.
If I can empty my "holding table" before I import and then give the
imported file the same name every...
|
by: dixie |
last post by:
If I sent a user an empty database container - dB with no tables and I
needed them to import their tables into it and one of their tables was a
hidden table with the prefix Usys, is there any way in code I can get that
table imported without them having to go to options and show hidden tables
and then import it manually?
dixie
| |
by: ANSWER |
last post by:
Is there any way I could disable user to create a new database and import
all of my tables and queries into his database.
I make .mde, disable shift+Enter, make logon users module (with your help
sometimes before) but still my tables and queries are free to take.
If you know couple solutions please let me know so I can decide.
Thanks
|
by: kaisersose1995 |
last post by:
Hi,
I've got an import procedure working, using a standard import
specification to import a .csv file into a temporary table.
The problem i'm having is that i have 4 different sets of borrower
details on the same line e.g. B1-Title, B1-Initials, B1-Surname,
B2-Title, B2-Initials, B2-Surname, etc.
all linked to my main borrower table via an unique account number.
My 1st append query matches which account numbers are new to the main...
|
by: thadson |
last post by:
Hi,
I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory.
I'm very new to this and I'm having trouble to implement this.
I have worked out so far the code to import certain cells into 1 table, but I do not know how to import some other cells into another tables so the data would be connected and remain together.
So lets say that I have 2 tables...
|
by: gollumullog |
last post by:
Good Day,
I have been having this issue for quite a long time, and have yet to find an easy/elegant solution.
I am trying to create tables in an Access database.
I have these tables as CSV files, with the Header as the first line.
I have approximately 1000 tables.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |