Struggling With Dts From .NET

Jan 23, 2007

Hi everyone,

We've got running an vb .net service which throws on-demand .DTSX. Now a new feature has been added: it must be able to launch dts 2000/7.0 too. No problem with that. It works fine using the same thread.

Issue comes when we were accostumed to cancel any DTSX execution for sake IDTSEvents interface and OnQueryCancel event. We want to the same but for the old ETL.

My wonder is how do the same but related with DTS???

I attached you this snippet of code which is responsible for launching a dts:

Private WithEvents paquete As DTS.Package2

paquete = New DTS.Package2

paquete.LoadFromSQLServer("SRVDESA1", , , DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , , "pruebaenric")

paquete.Execute()

Private Sub paquete_OnQueryCancel(

stuff (NEVER ENTRY HERE) ???

Private Sub paquete_OnProgress(ByVal EventSource As String, _

stuff (NEVER ENTRY HERE) ???

Private Sub paquete_OnError(ByVal EventSource As String, _

stuff (NEVER ENTRY HERE) ???

Let me know what's happening? Is something related with managed and unmanaged code? Any COM feature or something like that??

Or is only that I've got to define a private class how I did with SSIS and to use one specific interface??

Primary platform is Framework 2.0

Thanks in advance for your time and information provided,

Enric

View 1 Replies


ADVERTISEMENT

Struggling With Deployment Of SSE

Jul 25, 2006

Have my first .NET app deployed to remote host and configured successfully, except for one thing: can't figure out how to export my SSE tables to the SQL server database on the remote server.  I tried SQL Server Management Studio Express ... with that, I can access the remote database, but can't access the local database file I produced with VSWDE.  What is the appropriate tool to use to export tables from a local SSE database file to a remote SQL Server 2005?

View 3 Replies View Related

Struggling With Subquery

Jan 17, 2008

I am trying to get the SUM of the values from a subquery and I just can't wrap my head around the subquery thing! Can anyone please point out the error of my ways?

I have tried 2 slightly different ones:

Select project.[id] "ID", companyname.[name]"Company", project.projectname "ProjName", project.startdate "StartDate"
,SUM(BudgetTotal + AddTotal + StockTotal) "TotalBudget"
(SELECT ISNULL(SUM(budget.budget),0) AS BudgetTotal
FROM budget WHERE budget.projectID = project.[id])
(SELECT ISNULL(SUM(budget_additionals.budget),0) AS AddTotal
FROM budget_additionals WHERE budget_additionals.projectID = project.[id])
(SELECT ISNULL(SUM(project_stock.saleprice),0) AS StockTotal
FROM project_stock WHERE project_stock.projectID = project.[id])

From project, companyname

WHERE project.companyid = companyname.[id]
AND (project.startdate >= '2006-11-01')
AND (project.startdate <= '2007-10-31')
AND project.jobtypeid = 1
ORDER BY "Company"
This gives me an "Server: Msg 156, Level 15, State 1, Line 10
Incorrect syntax near the keyword 'From'" error...

The next one i tried looked like this:
Select project.[id] "ID"
,companyname.[name]"Company"
,project.projectname "ProjName"
,project.startdate "StartDate"
,SUM((SELECT ISNULL(SUM(budget.budget),0)FROM budget WHERE budget.projectID = project.[id]) +
(SELECT ISNULL(SUM(budget_additionals.budget),0)FROM budget_additionals WHERE budget_additionals.projectID = project.[id]) +
(SELECT ISNULL(SUM(project_stock.saleprice),0)FROM project_stock WHERE project_stock.projectID = project.[id])
) "Budget"

From project, companyname

WHERE project.companyid = companyname.[id]
AND (project.startdate >= '2006-11-01')
AND (project.startdate <= '2007-10-31')
AND project.jobtypeid = 1
ORDER BY "Company"
And I get "Cannot perform an aggregate function on an expression containing an aggregate or a subquery"

Cheers in advance :-)
Glyn

View 2 Replies View Related

I Am Struggling Through Views

Jul 20, 2005

Hi there, it's me again. I am having trouble with a view again. I amtrying to do a calculation, but there are some checks that need to betaken into consideration. Maybe a view is not the right way to dealwith this. I don't know.This is the beginning of my query.SELECT coalesce(f.filenumber, i.filenumber) as filenumber,i.InvoiceNumber, i.InvoiceValue, il.lineid, MPF = .21 * (il.UnitCost *il.UnitQty + il.AddMMV - il.MinusMMV - il.MinusNDC + il.ErrorAmt)FROM tblFILE f inner join tblINVOICE i on (f.filenumber =i.filenumber) left outer join tblINVOICE_LINE il on (i.Invoiceid =il.invoiceid)This works just as it should. However, if the Sum of all MPFs perfile total less than 25.00 or more than 485.00 then each MPF has to berecalculated as:Percentage of TotalEnteredValue = (InvoiceValue / (il.UnitCost *il.UnitQty + il.AddMMV - il.MinusMMV - il.MinusNDC + il.ErrorAmt)Percentage of TotalEnteredValue * 25.00 = MPF orPercentage of TotalEnteredValue * 485.00 = MPFCan you do something like this in a View? Or do I need to dosomething like a trigger?I greatly appreciate all help. I am struggling to get a foothold onviews. I am getting there.

View 4 Replies View Related

Struggling Importing .sql Table

Apr 2, 2007

I have two tables I need to create in msSQL and I have the .sql files with the information in them, is it possible to insert them through enterprise manager?
Or another way? Or are they meant for mySQL?

cheers

View 3 Replies View Related

Struggling With Inserting Data

Oct 31, 2007

Hello all

I am trying to insert data from the Report table to the Revised_Maintable
my problem is that I get an error message every time. I dont know what to do



INSERT INTO dbo.Revised_MainTable([IR Number], Date, [I/RDocument], [Violation Type] )
SELECT [Date], [I/RDocument], TypeOfIncident, [Incident Report No] FROM dbo.Report
WHERE NOT EXISTS(SELECT * FROM dbo.Report WHERE [Incident Report No] = [IR Number])



This is the Report Table [dbo].[Report](
[Incident Report No] [nvarchar](100) NOT NULL,
[Date] [datetime] NULL,
[Time] [datetime] NULL,
[Investigators Name] [nvarchar](100) NULL,
[Reported by] [nvarchar](100) NULL,
[Law Enforcement Agency] [nvarchar](100) NULL,
[Name of Officer] [nvarchar](100) NULL,
[Evidence Seized] [nvarchar](100) NULL,
[Associated Reports] [nvarchar](50) NULL,
[Corrective Action] [nvarchar](50) NULL CONSTRAINT [DF_Report_Corrective Action] DEFAULT (N'YES'),
[Comments] [ntext] NULL,
[I/RDocument] [ntext] NULL CONSTRAINT [DF_Report_I/RDocument] DEFAULT (N'SCANNED REPORT'),
[TypeOfIncident] [nvarchar](300) NULL,
[Exclusion] [nvarchar](50) NULL CONSTRAINT [DF_Report_Exclusion] DEFAULT (N'NO'),
[86_D] [nvarchar](50) NULL CONSTRAINT [DF_Report_86_D] DEFAULT (N'NO'),
[Loss] [money] NULL CONSTRAINT [DF_Report_Loss] DEFAULT (0.0000),
[LossType] [nvarchar](50) NULL,
[Area] [nvarchar](75) NULL,
[Action/Incident] [nvarchar](50) NULL,
[Security/GC] [nvarchar](50) NULL CONSTRAINT [DF_Report_Security/GC] DEFAULT (N'GC'),
CONSTRAINT [PK_Report] PRIMARY KEY CLUSTERED
(




and the Revised_MainTable

[dbo].[Revised_MainTable](
[I/RDocument] [ntext] NULL CONSTRAINT [DF_Revised_MainTable_I/RDocument] DEFAULT (N'Scanned Report'),
[IR Number] [nvarchar](100) NOT NULL,
[Date] [datetime] NULL,
[Inspector] [nvarchar](50) NULL,
[Area] [nvarchar](50) NULL,
[Violation] [nvarchar](50) NULL,
[Violation Type] [nvarchar](100) NULL,
[Loss] [money] NULL CONSTRAINT [DF_Revised_MainTable_Loss] DEFAULT (0.0000),
[Loss Type] [nvarchar](50) NULL,
[Employee] [ntext] NULL,
[Guest] [ntext] NULL,
[Action] [nvarchar](50) NULL,
[Action Type] [nvarchar](50) NULL,
[Notes] [ntext] NULL,
[Security/GC] [nvarchar](50) NULL CONSTRAINT [DF_Revised_MainTable_Security/GC] DEFAULT (N'GC'),
CONSTRAINT [PK_Revised_MainTable] PRIMARY KEY CLUSTERED
(

View 14 Replies View Related

SQL Transactional Replication Distribution Server Struggling

Jun 5, 2006

We are attempting to rollout a name and address system to 10,000 users who will use an application connected to an MSDE database.

We are using transactional replication to distribute data updates to them. Clients are connecting via the On-Idle feature of Synchronization Manager to grab transactions.

Server spec:
Network card: 1GB
Processors: 2* Xeon 3.2Ghz
Server spec: DL380 2Gb memory
Concurrent connections set to: 600
Disc: RAID 10 with 6400 controller

We are not using hyper-threading.

So far we have rolled the system out to 3500 subscribers, 500 per day.

Each day a subsciber will receive at least 400 transactions and 5000 commands.

Latency is 6 seconds, delivery rate 180 commands per second at less busy times.
Latency is 14 seconds, delivery rate 127 commands a second at busy times.

I have seen it get as slow as 0.04 commands a seconds at busy times.

The server becomes incredibly slow when there are more than 50 concurrent connections.

We are seeing 100 CPU for most of the day as clients connect to the distributor at various times. Lunchtime is particularly busy when people go to lunch, leaving their machines idle. We see lots of "time-outs" and "unable to connect to distributor" messages on the replication monitor during peak times.

What can we do to improve the performance of the distribution server?

Are we being over-ambitious by selection SQL Replication for this scenario?

Thank you for any help!

Best wishes

Julian

View 1 Replies View Related

Struggling To Import Data From Flat File To Sql Db

Apr 1, 2008

Hello all,

We have been trying now for the past 2 days to import data from a flat file to sql server database but with no luck.

The real issue here is that one of the field names has a very long value.

As a result, the import fails because it is unable to truncate the value.

We really don't want the value truncated but we have not been able to import the entire data file.

We have used nvarchar(max) but it doesn't work.

Can someone please let me know if you have encountered this type of issue and how was it resolved?

Thanks in advance.

View 12 Replies View Related

Still Struggling With Flat File Into Multiple Tables

Jan 23, 2007

So here's the issue

16 flat files all fixed width. Some over 350 columns.

Open flat file 1

extract id and go see if its in table 1, if true update table 1 with first 30 columns

otherwise insert into table 1 first 30 columns.

goto table 2, lookup id, insert/update next 30 columns...etc..etc..for 10 different tables

So I've got my flat file source, I do a derived column to convert the dates, i've got a lookup for table 1, then 2 ole db commands, 1 for update if lookup successful, 1 for insert if lookup fails.

How can I pass the id as a param into the update command so it updates where x = 'x'

also I need a pointer on doing the next lookup, eg table 2, would I do this as some sort of loop?.

If you can help great, but, please don't just reply with "I'd use this object"...then no explanation of how

v.v.frustrated newbie to SSIS

View 8 Replies View Related







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