|
Hello,
I am trying to build a SSIS Package programmatically with .NET (C#).
Now I have problems with the component "OLE DB Source" when trying to set the ParameterMapping in order to use variables in the data flow task.
...
string srcSql = "SELECT bla bla from ABC where YY = ? and BB = ? ";
Source.SetComponentProperty("AccessMode", 2);
Source.SetComponentProperty("SqlCommand", srcSql );
Guid ParamGuid = new Guid(TrackingIDOld.ID);
Guid ParamGuid1 = new Guid(TrackingIDNew.ID);
Source.SetComponentProperty("Parameter0 Name", ParamGuid.ToString());
Source.SetComponentProperty("Parameter1 Name", ParamGuid1.ToString());
Source.AcquireConnections(null);
Source.ReinitializeMetaData();
...
Alternatively, I also tried this, but it does not work, too:
Source.SetComponentProperty("ParameterMapping", "User::TrackingIDOLD");
Source.SetComponentProperty("ParameterMapping", "User::TrackingIDNew");
Does somebody know the correct syntax how to set the parameters?
Thanks for any advices!
Best wishes,
Miroslav Stimac
|
|
|
|
|
I assume you're using some sort of API, but you don't say, so how are we to help you?
Alternatively, I know people who use a product called Mist and its BIML language for generating SSIS packages. (I've never used it, I prefer to do it the hard way.)
|
|
|
|
|
|
need a idea to configure master slave model in any open source databases
info like master database trigger are done the data sync in slaves
an application solution are also welcome
|
|
|
|
|
|
Do some research into replication,I think that is what you are looking for
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello all.
In SQL Server 2012, it is possible to have an email sent to a group when a row is deleted from a given table?
Regards.
|
|
|
|
|
Not having tried this, but I would imagine you can create a trigger on delete from the table that calls a stored procedure to send an e-mail.
As for the syntax, you should be able to find how to create the trigger relatively easily.
But, for sending e-mail, that may be dependent on your e-mail platform.
|
|
|
|
|
I would not recommend sending an email directly from a delete trigger because you may pay a performance penalty and possibly abort your delete transaction if the email server cannot send your message.
Slight change in approach would be to write a custom "logging" table where you capture the entire row from the table and store it. You can then have a separate program read through this table and send emails notifying your distribution list.
The other advantage is that you have a copy of the deleted data. You can purge this data as you see fit.
Just and idea.
|
|
|
|
|
Thanks to both for your pointers.
|
|
|
|
|
I'm converting some old CDao classes to ADO (ODBC) for Access database handling. Part of my code copies a table record from one database to another. When I do the CRecordset::Update I get a CDBException that completely unhelpfully tells me:
m_strError "String data, right truncated
m_strStateNativeOrigin "State:22001,Native:31,Origin:[Microsoft][ODBC Microsoft Access Driver]
Is there any way to get my code to tell me which field(s) is(are) causing the problem?
|
|
|
|
|
Kyudos wrote: right truncated
I would check the length of everything, data, parameter, target field in the table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I tried that...I can't find it!
Surely the driver must 'know' where this happens - why can't it just tell me?
|
|
|
|
|
It is the same with SQL Server and has always been an irritant. With SQL Server you have sql profiler and you can trap the actual statement passed to the database including data. You can then manually execute the command in management studio. This gives you a more detailed error response and you can use the mark I eyeball to inspect the data.
I know you can execute sql strings in Access but I do not know where to trap the command passed to the database from the client.
I would strongly suggest moving the database from Access to SQL server if possible.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I would strongly suggest moving the database from Access to SQL server if possible. That's impractical unfortunately.
I've checked all the text field member lengths before and after the Update, they both match each other and the database definition. The are no problems in DoFieldExchange . I don't know what to do next...
|
|
|
|
|
Hah!
My fault of course - I was checking the wrong database definition - I had a field the wrong length!
oops!
|
|
|
|
|
Yah, done that well... yesterday actually!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello everyone,
I would like to know if there is a function that can get rid of a 1000 seperator.
My Source data looks like this
1.676
3.349
109
58
70
1.887
I would like it to be like this:
1676
3349
109
58
70
1887
Does anyone know how I can fix this in my following statement please?
, CASE COALESCE(SHIPPED_VAL_MONTH, '') WHEN '' THEN 0 ELSE CAST(SHIPPED_VAL_MONTH as decimal(18,2)) END AS SHIPPED_VAL_MONTH
Kind regards,Ambertje
|
|
|
|
|
From sqlservercentral.
Create a UDF and put this in it:
WHILE PATINDEX('%[^0-9]%',@string) <> 0
SET @string = STUFF(@string,PATINDEX('%[^0-9]%',@string),1,'')
SELECT @string
|
|
|
|
|
Hello Jörgen,
Can you help me to create such a User defined function for my case please?
I have little experiece with writing functions.
Kind regards,
Ambertje
|
|
|
|
|
You are going to get better value out of an article than a forum post, there is even one from CP in these results[^]
Ambertje wrote: help me to create such a User defined function
That is not how the site works, we help you to learn how to create the functions, there are other sites that will do the job for you.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
plz help me to create pdf from xml code manually
|
|
|
|
|
i have a table with students marks records which contains the data as follows:
admno subjectGroup Exam subject marks
4719 GROUP I CAT-01 ENGLISH 45
4719 GROUP I CAT-01 KISWAHILI 78
4719 GROUP II CAT-01 CHEMISTRY 67
4719 GROUP II CAT-01 BIOLOGY 45
4719 GROUP II CAT-01 PHYSICS 45
4719 GROUP I CAT-01 MATHEMATICS 90
4720 GROUP I CAT-01 ENGLISH 67
4720 GROUP I CAT-01 KISWAHILI 61
4720 GROUP I CAT-01 MATHEMATICS 77
4721 GROUP I CAT-01 ENGLISH 81
4722 GROUP I CAT-01 KISWAHILI 62
4723 GROUP I CAT-01 ENGLISH 89
4724 GROUP I CAT-01 KISWAHILI 63
4726 GROUP I CAT-01 ENGLISH 78
4728 GROUP I CAT-01 ENGLISH 67
4730 GROUP I CAT-01 KISWAHILI 81
4734 GROUP I CAT-01 MATHEMATICS 56
i need to add marks belonging to a particular student(admno) based on the following criteria:
for each student;
1. select 3 group I subjects
2. select the best 2 group II subjects
...kindly assist
modified 13-Apr-15 16:50pm.
|
|
|
|
|
What is your question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
summing up marks per student(admno) based on the conditions given
|
|
|
|