473,412 Members | 2,067 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Upsized ACCESS Database to SQL Server 2000 with AS/400 Link

I have upsized an Access database into SQL Server and manged to get
the data in place ok. The wizard created an Access Project which I
have started to modify.

However, I am also trying to get data from an AS/400. Specifically for
a currency/exchange rate file. I only want ot copy the records since
the last copy otherwise there are a vast number of records.

I have created a linked server to the AS/400 within SQL Server, and
created a view, within my specific database which allows me to look at
all the data in the table.

However, my problem is that I want a VB routine, in the Access
Project, which lets me copy out specic records from the view into a
table within the SQL Server database. Any clues?????

My oroginal code used a link to the AS/400 and the folowing code:-

s = "INSERT into zacjdf00 "
s = s + "select CJCNCD, CJD5E9, CJCUCD, CJD5FF, CJD5FG, CJD5FH,
CJD5FI, CJD5FJ, CJD5FK "
s = s + "from XGHLDTM_ZACJDF00 "
s = s + "where "
s = s + "CJD5E9 = '" & group & "'"
DoCmd.RunSQL (s)

group is preset in the VB code.
Jul 20 '05 #1
1 3211

"Bob Davies" <da**********@virgin.net> wrote in message
news:9b************************@posting.google.com ...
I have upsized an Access database into SQL Server and manged to get
the data in place ok. The wizard created an Access Project which I
have started to modify.

However, I am also trying to get data from an AS/400. Specifically for
a currency/exchange rate file. I only want ot copy the records since
the last copy otherwise there are a vast number of records.

I have created a linked server to the AS/400 within SQL Server, and
created a view, within my specific database which allows me to look at
all the data in the table.

However, my problem is that I want a VB routine, in the Access
Project, which lets me copy out specic records from the view into a
table within the SQL Server database. Any clues?????

My oroginal code used a link to the AS/400 and the folowing code:-

s = "INSERT into zacjdf00 "
s = s + "select CJCNCD, CJD5E9, CJCUCD, CJD5FF, CJD5FG, CJD5FH,
CJD5FI, CJD5FJ, CJD5FK "
s = s + "from XGHLDTM_ZACJDF00 "
s = s + "where "
s = s + "CJD5E9 = '" & group & "'"
DoCmd.RunSQL (s)

group is preset in the VB code.


Assuming that your view works, and it is a view on the XGHLDTM_ZACJDF00
table, have you simply tried using your original query, but with updated
table names?

s = "INSERT into dbo.MyTable "
s = s + "select CJCNCD, CJD5E9, CJCUCD, CJD5FF, CJD5FG, CJD5FH,
CJD5FI, CJD5FJ, CJD5FK "
s = s + "from dbo.MyView "
s = s + "where "
s = s + "CJD5E9 = '" & group & "'"
DoCmd.RunSQL (s)

Alternatively, you could use pure SQL, perhaps in a stored procedure (which
would let you pass in the value as a parameter):

insert into dbo.MyTable
select CJCNCD, CJD5E9, CJCUCD, CJD5FF, CJD5FG, CJD5FH, CJD5FI, CJD5FJ,
CJD5FK
from dbo.MyView
where CJD5E9 = 'SomeValue'

If these suggestions don't help, perhaps you could clarify what you've tried
already, and any issues/errors that you have.

Simon
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ErickR | last post by:
We are experiencing a problem with Sql Server 2000 linking to an Access 97 file. We have two machines that link to this .mdb file, and we recently upgraded one to newer hardware, SP3a, MDAC 2.8,...
3
by: *no spam* | last post by:
I want to move my Access 2K database into MSDE. The Access Upsizing Wizard crashes (a known bug wi A2K), so I'm using the following suggested method: Access --> New --> Project (Existing...
5
by: dananrg | last post by:
I've created a small company database where the tables reside in a SQL Server database. I'm using Access 2000 forms for a front end. I've got a System DSN set-up to SQL Server and am using links...
5
by: premmehrotra | last post by:
I currently have a multi-user access database which is put on a shared drive L: on a Windows Servers. Entire database is one file premdb.mdb. Users access this database from their laptops....
1
by: rcmail14872 | last post by:
I used the upsize wizard to change my Access 2002 database to a SQL Server ADP project. I had a form where the user entered a value into a text box and when a command button on the form was...
12
by: Mike | last post by:
I have an Access DB that I upsized to a SQL server DB. The tables that I upsized I can't seem to modify. I wanted to insert some data into the table and I am getting the following error: ...
6
by: baramee | last post by:
I develop web application by asp.net with ms access. In general , it work fine. But if hit rate of web is very much, it occure error 'Unspecified error'. it error on conn.open. My code will be...
1
by: Bruce Le Favre | last post by:
I upsized (using Upsize Wizard) ACCESS back end to MSSQL 2000. Front end is still ACCESS. I'm getting error when trying to add or updated a record entry from front end. The error message reads:...
1
by: marcf | last post by:
Ello everyone, Ok i've just upsized the database to SQL Server 2005, here is the code: Set con = Application.CurrentProject.Connection Set rs = New ADODB.Recordset rs.CursorType =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
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...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.