473,416 Members | 1,849 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,416 software developers and data experts.

.Net Services (transfering Data from AS400 into SQL Server)

Hi,

I have BIG question and I gues it is the BEST question.

I have a problem that I am guessing the best solution is to create some sort
..NET Services.

This Service(s) must check every hour the data that reside on AS400 and
transfer into the SQL Server. Services also have to be run in between 8:00 AM
and 5:00 PM

Does anyone knows how to achive this. I like to have some small example to
learn but if everyone is bussy than I guess I am more than happy to receive
any answere that will show me the right direction.

I thank you in advance to you for reading this post.

Rgds,
GC


Nov 22 '05 #1
2 2635
Create two data adapters, one for the IBM and one for the Sql Server. Set
the AcceptChangesDuringFill property of the IBM adapter to false. Fill the
datatable. Then, immediately use the same datatable and call update using
the Sql Server adapter.

Obviously ADO.NET isn't the ideal technology for data transfer, but if you
must do it client side, this should work for you
"Niyazi" <Ni****@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
Hi,

I have BIG question and I gues it is the BEST question.

I have a problem that I am guessing the best solution is to create some
sort
.NET Services.

This Service(s) must check every hour the data that reside on AS400 and
transfer into the SQL Server. Services also have to be run in between 8:00
AM
and 5:00 PM

Does anyone knows how to achive this. I like to have some small example to
learn but if everyone is bussy than I guess I am more than happy to
receive
any answere that will show me the right direction.

I thank you in advance to you for reading this post.

Rgds,
GC

Nov 22 '05 #2
Hi Ryan,

Thank you for input. I use similar method to achive while transfering data
between IBM AS400 to SQL Server with user interaction method.

In my main form under File menu I have option so user can manually transfer
a data just clicking simple menu button.

But my problem is I want to do this via Windows Services and I have no idea
how to achive it.

I don't like to use a Timer that I can imort from Toolbox. I want to use
System.Timer so I can calculate the tick method like (1 * 60 * 60 * 100)
so Windows Services can run the transfer every 1 hours between 8:00AM and
5:00PM.

Hers is the my code and my questions that I find the only way to achive it?

--------------------------------------------------------------------------------------------------------------------
Imports System
Imports System.ServiceProcess
Imports System.Diagnostics
Imports System.Timers

Public Class TransferData: inherits ServiceBase
proteced timer As Timer
Public Shared Sub Main()
ServiceBase.Run(New TransferData)
End Sub
Public Sub New()
MyBase.New()
CanPauseAndContinue = True
ServiceName = "CHQ_TransferData"

timer = new Timer()
timer.Interval = 3600000 'Every 1 Hour (1 * 60 * 60 * 1000)
AddHandler timer.Elapsed, AddressOf onTimer
End Sub
Protected Overrides Sub OnStart(args() As String)
EventLog.WriteEntry("CHQ_TransferData Service Started")
timer.Enabled = True
End Sub
Protected Overrides Sub OnStop()
EventLog.WriteEntry("CHQ_TransferData Service Stoped")
timer.Enabled = False
End Sub
Protected Overrides Sub OnPause()
EventLog.WriteEntry("CHQ_TransferData Service Paused")
timer.Enabled = False
End Sub
Protected Overrides Sub OnContinue()
EventLog.WriteEntry("CHQ_TransferData Service Continued")
timer.Enabled = True
End Sub
Protected Sub OnTimer()
'I belive I HAVE to call the another class that does the Transfering
Dim callTransfer as New clsTransferData
End Sub

End Class

-------------------------------------------------------------------------------------------------------------------

I belive inside the Protected Sub OnTimer() I will have to call another
class that does the transfering Job. Am I right?

- Can you or anyone tell me if I am right? And If not what should I do?
- If I am right How can I use the error information in case of any failure
and inform the Administrator
that services is failed? So they can check it or simply Transfer the data
manually.
- If everythings might be okay for you than how to achive the Installation
process without using InstallUtil.exe manulay? How can I create a simple
setup for this services so Admin people simpley runs the setup and install
the Services on the PC that SQL Server resides on?
Again I thank you in advance for your kind understanding and your future help.

Rgds,
GC
Nov 22 '05 #3

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

Similar topics

2
by: Steve McDonald | last post by:
Can anyone help me??! What is the best way to import data from One World into SQL Server? If it's possible to use DTS then should I use the OLEDB connection object? Many thanks, Steve
3
by: fn | last post by:
Can anyone help me understand what it takes to define a Linked Server connection to an IBM eSeries (AS400)? Do I need Microsoft's SNA Server or some other product or can I simply do it with the...
0
by: Noor | last post by:
Hi, I'm trying to dug this issue since couple of days but couldn't find any solution. I have SQL server 2000 SP 3 and Host Integration Server 2000 SP 1 running. I'm able to download data from...
2
by: Niyazi | last post by:
Hi, Our company uses IBM AS400 and DB2 (version 4.5 I guess). I have to do some report but I donot know how to access the AS400 DB2. I search IBM unfortunately IBM site in mess. Can anyone tell...
2
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
2
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every...
2
by: Dinu | last post by:
Hi All I am trying to insert records into the AS400 DB2 database from SQL-2000 using linked server. I have created a As400 Db2 as Linked server in my Sql Server. I used the following query...
0
by: CompDude | last post by:
Hi All I am trying to copy data from DB2 to SQL server using SQL Data Tranformation Services. I am able to do that by supplying AS400 username/password along with the iSeries DSN Name, at the...
10
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another...
0
by: sunrt | last post by:
We have an As400 system that has program which executes batch files which resides on the SQL server 7.0 computer . Those batch files run SQL server jobs using isql. The whole idea about this is...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.