473,811 Members | 3,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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 2675
Create two data adapters, one for the IBM and one for the Sql Server. Set
the AcceptChangesDu ringFill 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****@discuss ions.microsoft. com> wrote in message
news:78******** *************** ***********@mic rosoft.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.ServiceP rocess
Imports System.Diagnost ics
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()
CanPauseAndCont inue = True
ServiceName = "CHQ_TransferDa ta"

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.WriteE ntry("CHQ_Trans ferData Service Started")
timer.Enabled = True
End Sub
Protected Overrides Sub OnStop()
EventLog.WriteE ntry("CHQ_Trans ferData Service Stoped")
timer.Enabled = False
End Sub
Protected Overrides Sub OnPause()
EventLog.WriteE ntry("CHQ_Trans ferData Service Paused")
timer.Enabled = False
End Sub
Protected Overrides Sub OnContinue()
EventLog.WriteE ntry("CHQ_Trans ferData 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
5723
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
7913
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 tools provided with SQL Server 2000? Any guidance would be very appreciated. Thanks. Farid
0
1796
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 AS400/DB2(V5R2M0) into SQL server, using Microsoft OLE DB Provider for DB2 in DTS. But when I tried to upload the same table (downloaded from AS400 into Sql server) back to AS400, I got the following error.
2
3737
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 me how to access AS400 DB2 so I can use VB.NET for my application to create a report? I also learn from IBM site that there is a DB2 Data Connection for Visual Studio.Net and acts as IBM Explorer in conjunction with Server Explorer and toolbar...
2
5347
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 Client-Access v5.2 program using (in VB.NET) ODBC driver (DSN Name …) . I can retrieve datam work on it using VB.NET and I can send into 'NEW' Excel file. My first problem starts here:
2
595
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 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
2
8161
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 as mentioned on Microsoft support website Insert OPENQUERY(LinkedServr,'SELECT Column FROM Mytable')
0
1725
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 time of data retrieval from DB2 database tables to SQL Server. Problem is i have 20 different DTS packages, and if i change my AS400
10
1674
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 system. The system generally works quite well. Currently the User interface calls for a refresh of data every 15 minutes (selectable) and the Data Access Class connects to the DB and retrieves the
0
2240
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 when ever some jobs will run on As400 to populate some files the program will be called to execute the batch files which will run the sql jobs to populate sql tables. This process working fine. But now we have installed SQL 2005 and trying to move ....
0
9731
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, 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...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10393
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 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...
1
10405
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
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 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...
0
6893
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();...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
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 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.