LoadFromSQLServer Won't Work......

Jul 23, 2005

I have a VB.NEt Winform app deplyed on ServerA. I have a DTS package
on ServerB. When I try to load the package with:

package.LoadFromSQLServer(serverB, uid, pwd,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default , , , , packageName)

Where serverB, uid, pwd are variables set in the program and are valid,
I get this error

Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not
exist or access denied.

Which makes no sense because I'm using SQL Authentication and I am
1000000000% sure the uid and pwd are correct. Am I missing something?
My VB app runs fine on the sql server but not anywhere else and I need
to run it elsewhere against the db.

View 3 Replies


ADVERTISEMENT

LoadFromSQLServer

Jan 4, 2002

I am trying to run a DTS package from a stored proc using the example within this web site. The following line is where I am receiving a problem:

EXEC @resultcode = sp_OAMethod @pkg,'LoadFromSQLServer("PASCAL", "sa", "", 0, , , , "DeleteInactiveFiles")', NULL

When I set the flag to 0 as in the example above and run the stored proc, it runs continually (I allowed it to run for over an hour) but never reaches the next line of code in the stored proc.

If I change the flag to 256 such as:

EXEC @resultcode = sp_OAMethod @pkg,'LoadFromSQLServer("PASCAL", "sa", "", 256, , , , "DeleteInactiveFiles")', NULL

I receive the error: Login failed for user 'NT AUTHORITY/SYSTEM'

What am I doing wrong?

Thanks for your help.

View 3 Replies View Related

Fails Using LoadFromSqlServer

Aug 18, 2006

hi everyone,

I'm trying to load a dtsx from my front-end app but says the following:



pkg = app.LoadFromSqlServer(ActObject.packageName, "SRVDESASQL2005", "usrSSIS", "ninot", Nothing)

ActObject.packageName = "SSISdev"

usrSSIS is a sql user which own enough permissions over MSDB

Try returns me: "Specified package could not have been loaded in Sql Server"

Any ideas? I'm stuck.

TIA

View 1 Replies View Related

Error In LoadFromSqlserver

Apr 13, 2007



Hi All,



I have created a SSIS package and deployed it on Sql server. I need to load this package from my C# code. when i am trying to execute following code it is giving error "Cannot find folder MSDBDevSAEMeyyDev1" .. whereas this is already present in side stored packages of server.



pkg = app.LoadFromSqlServer(@"MSDBDevSAEMeyyDev1", "BLRKEC36570D", "sa", "SAEuser123", error);



what could be the reason for this ?



Thanks,

Anshu

View 8 Replies View Related

DTEXEC / LoadFromSQLServer Failed

Aug 7, 2007

When I try to execute a package (in sql server) using DTEXEC I get the following error. The creator of the package is different from the executing user of the package. But I have also set EncryptionLevel FROM EncryptWithUserKey TO DontSaveSensitive (Which I assume should resolve this issue), re-imported the package to sql server, but the error remains the same. Any pointers?


The utility was unable to load the requested package. The package could not be loaded.

Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started: 3:18:56 PM

Could not load package " est1" because of error 0xC0014062.

Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80040E14 (Only the owner of DTS Package 'test1' or a member of the sysadmin role may create new versions of it.). The SQL statement that was issued has failed.

Source:

Started: 3:18:56 PM

Finished: 3:18:56 PM

Elapsed: 0.328 seconds

View 5 Replies View Related

Events For LoadFromSqlServer Method???

Sep 1, 2006

Hi everyone,

I was wondering what kind of events fires when you do a LoadFromSqlServer method??? I've got defined a Events class but debugging with F11 never get in touch with any event (apparently or mabye the problem
is that I haven't declared that concrete one)

Let me know if possible or not. I provide you my snippet of code:


Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package 'Para que no choque con el objeto APPLICATION DE SYSTEM.WINDOWS.FORMS

Dim app As New Microsoft.SqlServer.Dts.Runtime.Application



Dim EventsSSIS As Eventos
EventsSSIS = New Eventos()
..
..

pkg = app.LoadFromSqlServer(ObjSSIS.sRutaDts & "" & ObjSSIS.sSSISName, ObjSSIS.sServer, "usrSSIS", "aaa", EventsSSIS)
..
..


Public Class Eventos
Implements IDTSEvents

OnTaskFailed(ByVal taskHost As TaskHost) Implements IDTSEvents.OnTaskFailed
OnWarning(ByVal source As DtsObj
OnPreValidate
..
..



Thanks in advance,

View 4 Replies View Related

One Package Two Configurations; App.LoadFromSqlServer(); Package.ImportConfigurationFile(Dev/Prod.dtsconfig);

Dec 19, 2007

Hi all,
I need one more help!
we can select the dtsconfig file with the Environment variable(indirect configuration);
but i need to select the configuration file at runtime; i've to load the package from the server and apply local configuration file to the package and run in a web server;

Requirements;
1. i have packages with its xml configurations for connection strings alone!
2. i deployed it on the server
3. Trying to execute the packages in a web page onclick event;

We have ASP.net WebPage; in On_Click Event, i have this code;

Application ap = new Application();
Package pk = ap.LoadFromSqlServer("\PROJECT", "itsssqldb", "pmo_package_user", "password", null);
pk.ImportConfigurationFile(@"Packagesdev_staging.dtsConfig");
pk.Execute();
here PROJECT is the Package name; i'm loading the package from the Common Sequel Server 2005; and applying the configuration file to that package and trying to execute this;
but its not using the config file what i mentioned; its returning failure!!

Can you please help me to resolve this issue!,

(The intention of doing this job is to select the configuration file( prod, dev) at runtime)

View 10 Replies View Related

Why Does This Not Work

Feb 27, 2007

 My error is that 'Name tr is not declared'  tr.Rollback() I tried moving the 'Dim tr As SqlTransaction' outside the try but then I get 'Variable tr is used before it si assinged a value'.
What is the correct way?        Try            conn.Open()            Dim tr As SqlTransaction            tr = conn.BeginTransaction()            cmdInsert1.Transaction = tr            cmdInsert1.ExecuteNonQuery()            cmdInsert2.Transaction = tr            cmdInsert2.ExecuteNonQuery()            cmdInsert3.Transaction = tr            cmdInsert3.ExecuteNonQuery()            tr.Commit()        Catch objException As SqlException           tr.Rollback()            Dim objError As SqlError            For Each objError In objException.Errors                Response.Write(objError.Message)            Next        Finally            conn.Close()        End Try 

View 5 Replies View Related

Can't Get LIKE To Work

Apr 19, 2007

I have the below procedure that will not work- I must be losing my mind, this is not that difficult - mental roadblock for me.
Using SQL Server 2000 to create SP being called by ASP.Net with C# code behind
stored procedure only returns if input exactly matches L_Name
PROCEDURE newdawn.LinkNameLIKESearch @L_Name nvarchar(100)AS SELECT [L_Name], [L_ID], [C_ID], [L_Enabled], [L_Rank], [L_URL] FROM tblContractorLinkInfo WHERE L_Name LIKE @L_Name RETURN
I tried: WHERE L_Name LIKE ' % L_Name % '  no luck. What am I missing?
Thank you
 

View 2 Replies View Related

SP Does Not Work.

May 24, 2007

SP below is not work.It gives null for @kaysay 
I used parametric table name. Is this the problem? 
My aim to calculate record count of a table
Thanks. 
 
CREATE PROCEDURE Tablodaki_Kayit_Sayisi(@TABLO varchar(30))AS
Declare @kaysay bigintDeclare @SQLString nvarchar(100)Declare @Param nvarchar(100)
Set @SQLString = N'Select @kaysayOUT = count(BELGE) From ' + @TABLOSet @Param = N'@kaysayOUT bigint'
Execute sp_executesql@SQLString,@Param,@kaysayOUT = @kaysay
Select @kaysay
Return
 
GO

View 3 Replies View Related

Can Anyone Tell Me Why The Following Sql Does Not Work?

Sep 3, 2007

SELECT H.id, H.CategoryID ,H.Image ,H.StoryId ,H.Publish, H.PublishDate, H.Date ,H.Deleted ,SL.ListTitle,C.CategoryTitle
FROM HomePageImage H
JOIN shortlist SL on H.StoryId = SL.id
(INNER JOIN category C on H.CategoryId = C.CategoryId)
order by date DESC

View 4 Replies View Related

Please Help Me To Keep My Work...(:

Apr 12, 2004

Hello,

I am trying to query with my stored procedure. I am getting comma separated list as input parameter (which is VARCHAR) .

The table column, which I have to compare with input parameter value , is in INTEGER datatype.

So when , I compare Like as follows:-

" AND TABLE1.EMPID IN (@INPUTPARAMETERLIST)"

I am getting error. "Syntax error converting the varchar value '34,343' to a column of data type int."

Could anybody help me , to solve this ?

Thanks !

Nicol

View 1 Replies View Related

Why Won't This Work!?

Aug 31, 2004

I have a textbox and a checkbox on a form and I'd like to add both values to a db. The textbox value gets inserted fine but I'm having trouble with the checkbox. Any ideas would be greatly appreciated.

Thanks

Form1 is the column in my db.




SqlCommand myCmd = new SqlCommand();

myCmd.Parameters.Add("@ClientCode",SqlDbType.VarChar).Value = TextBox2.Text;

myCmd.CommandText = "UPDATE table SET Form1 = 'Yes' WHERE ClientCode = @ClientCode";


sqlConnection1.Open();
myCmd.Connection = sqlConnection1;

if( CheckBox1.Checked == true)
{
myCmd.ExecuteNonQuery();
}

sqlConnection1.Close();

View 3 Replies View Related

DBA Work

Aug 29, 2001

Hi,

Beside working right from the server how else someone can perform the SQL admistration job, I guess my question is how do most SQL DBA perform their administration without going to the server directly. Anyone --- can help please??

Thanks in advance.

View 2 Replies View Related

Does This Work?

Mar 15, 2007

Declare @StartDate datetime
Declare @EndDate Datetime
Set @StartDate = dateadd(day, datediff(day, 0, getdate()), 0)
Set @EndDate = getdate()

The job runs at 11:30 pm so I want the start date to be the same but the time to be equal to 00:00:00.0 When I run the getdate does it also return a time stamp?

The Yak Village Idiot

View 1 Replies View Related

Why Did It Work?

Aug 6, 2007

I had a problem where some users were experiencing timeouts when trying to add a single record to a table with 2.3 million records.
It's not a very wide table; only 10 columns and the biggest column in varchar 500. The rest are guid, datetime, tinyint...

There is also an old VB app that inserts about 3000 records a day into this table during office hours while users occasionally try and insert a record into this table.

Something said to me that the problem could be indexes but I wasn't quite sure because I though indexes only have an impact on select, delete & update. And not particulary on insert. But I checked it out anyway and noticed that the 3 indexes (1 column PK, 1 column Clustered & 1 column non-clustered) weren't padded. So I changed that (Fill Factor 95) and the problem has gone away. But why? I thought the insert would just have appended it to the end of the index before I made this change? Why would that time out?

View 3 Replies View Related

Why Does One Work, But Not The Other?

Mar 25, 2008



I have the following queries. The first returns the 'Unknown' row, the second works the way I would expect. Are my expectations wrong? Can someone describe for me what is going on?

Thanks




Code Snippet
select *
FROM
SynonymComFinancialCategory b
LEFT JOIN TT_FinancialCategory a
ON
a.FinanceGroup = b.FinanceGroup
AND a.FinanceCode = b.FinanceCode
AND a.Finance = b.Finance
AND b.Finance <> 'Unknown'
WHERE
a.FinanceGroup IS NULL
AND a.FinanceCode IS NULL
AND a.Finance IS NULL










Code Snippet
select *
FROM
SynonymComFinancialCategory b
LEFT JOIN TT_FinancialCategory a
ON
a.FinanceGroup = b.FinanceGroup
AND a.FinanceCode = b.FinanceCode
AND a.Finance = b.Finance
WHERE
a.FinanceGroup IS NULL
AND a.FinanceCode IS NULL
AND a.Finance IS NULL
AND b.Finance <> 'Unknown'

View 8 Replies View Related

Coalesce Does Not Seem To Work

Sep 27, 2006

  Hi,I have the following table with some sample values, I want to return the first non null value in that order. COALESCE does not seem to work for me, it does not return the 3rd record. I need to include this in my select statement. Any urgent help please.Mobile    Business     PrivateNULL        345           NULL4646        65464        65765NULL                        564654654     564           6546I want the following as my results:Number3454646564654654Select COALESCE(Mobile,Business,Private) as Number  from Table returns:3454646654654 (this is a test to see if private returns & it did with is not null but then how do i include in my select statement to show any one of the 3 fields)select mobile,business,private where private is not null returns:657655646546thanks

View 1 Replies View Related

Update Does Not Work Well

Sep 29, 2006

Hello,I created a formview in a web page. The data are in a sql server express database.With this form, I can to create a new data, I delete it but I can't to modify the data.The app_data folder is ready to write data; the datakeynames element in formview web control declared. I replace the automated query created by VS 2005 by a strored procedure to see if the problem solved.The problem is the same with an update query or a update stored procedure...Have you an idea, please.Than you for your help.Regards.

View 1 Replies View Related

Update Does Not Work

Jan 9, 2007

Im working with a detailsview and when I try to edit something and then update, the changes are not saved.
I have 2 tables ("[etpi.admin].Ocorrencias" and "[etpi.admin].SMS") that store the data that Im trying to change. Since Im having problems with the name of tables, Im coding it manually, using SQL server management studio and VWD.
I believe my code can be wrong (Im new to vwd and C# world), so here it is:
UpdateCommand="UPDATE [etpi.admin].Ocorrencias SET [Status_Ocor] = @Status_Ocor, [Percentual] = @Percentual, [IDPriori] = @IDPriori, [Abertura] = @Abertura, [IDTecRes] = @IDTecRes, [Area] = @Area, [CodEquip] = @CodEquip, [Descricao] = @Descricao, [Destinatario] = @Destinatario, [Data_Implanta] = @Data_Implanta WHERE [etpi.admin].Ocorrencias.IDOcorre = @IDOcorre
UPDATE [etpi.admin].SMS SET [idSMS] = @idSMSWHERE [etpi.admin].SMS.IDOcorre = @IDOcorre"> 
<UpdateParameters><asp:Parameter Name="idSMS" Type="Int32" /><asp:Parameter Name="Status_Ocor" Type="String" /><asp:Parameter Name="Percentual" Type="Int32" /><asp:Parameter Name="IDPriori" Type="Int32" /><asp:Parameter Name="Abertura" Type="DateTime" /><asp:Parameter Name="IDTecRes" Type="Int32" /><asp:Parameter Name="Area" Type="String" /><asp:Parameter Name="CodEquip" Type="Int32" /><asp:Parameter Name="Descricao" Type="String" /><asp:Parameter Name="Destinatario" Type="String" /><asp:Parameter Name="Data_Implanta" Type="DateTime" /><asp:Parameter Name="IDOcorre" Type="Int32" /></UpdateParameters>
Thx.

View 9 Replies View Related

My Rollback Does Not Work

May 30, 2007

My rollback does not work
In my SP I want any of cmdS,cmdS2,cmdS3,cmdS4 produces error Rollback must be executed for all of cmdS,cmdS2,cmdS3,cmdS4 . I tested for error producing situation but no rollbak occured.
How can I solve this problem. Thanks.
Below is my SP .
..........
..........
.......... 
begin transaction
..........
..........If Len(ltrim(rtrim(@cmdS)))>0
execute(@cmdS)
 If Len(ltrim(rtrim(@cmdS2)))>0
execute(@cmdS2) If Len(ltrim(rtrim(@cmdS3)))>0
execute(@cmdS3)
 If Len(ltrim(rtrim(@cmdS4)))>0
execute(@cmdS4)
If Len(ltrim(rtrim(@cmdS)))>0 or Len(ltrim(rtrim(@cmdS2)))>0 or Len(ltrim(rtrim(@cmdS3)))>0 or Len(ltrim(rtrim(@cmdS4)))>0
Beginif @@ERROR <>0
begin
rollback transaction
set @Hata = 'Error !'
end
Else
Beginset @Hata = 'Sucessfully executed :)' End
End
commit transaction
RETURN
 
 

View 1 Replies View Related

Does Not Work On Page

Jun 5, 2007

I can test it in query builder but when i preview the page and go to do the search i get nothing
Here is my statement
SELECT     Employees.Last_Name, Employees.First_Name, Job_Transaction.Name, Seq_Descript.Seq_DescriptionFROM         Call_List INNER JOIN                      Call_Group ON Call_List.Group_ID = Call_Group.Group_ID AND Call_List.Group_ID = Call_Group.Group_ID INNER JOIN                      Employees ON Call_List.Clock = Employees.Clock INNER JOIN                      Job_Transaction ON Call_Group.Group_ID = Job_Transaction.Group_ID INNER JOIN                      Seq_Descript ON Call_List.Sequence = Seq_Descript.SequenceWHERE     (Call_List.Clock = @Clock)
Mike

View 2 Replies View Related

Delete Does Not Work.

Jul 2, 2007

Hi all.I have used a SqlDataSource in my page with this delete command:DELETE FROM tblPersonnel WHERE (ID = @original_ID)and the "OldValueParameterFormatSring" property of the datasource is "original_{0}".and i also have a GridView and a button for delete in rows.(it's CommandName is "Delete"). But when i try to delete a record, the record does not get deleted and this button only makes a PostBack on the page! Why doesn't it work?
Thanks in advance.

View 8 Replies View Related

UPDATE DOES NOT WORK!!

Sep 10, 2007

hi all, i have created a gridview with the select,delete and insert commands working properly. but the update command does not work. when i edit a column and click the update button, it generates no errors but does not save the changes. it just brings back the original values. i dont know wats missing. can anyone help me?
this is part of my code:UpdateCommand="UPDATE [test101] SET Surname=@Surname, Names=@Names,Registration=@Registration,[Course code]=@Course_code,Grade=@Grade WHERE ID=@ID1 "<UpdateParameters>                <asp:Parameter Name="Surname" Type=String />                <asp:Parameter Name="Names" Type=String />                <asp:Parameter Name="Registration" Type=String />                <asp:Parameter Name="Course_code" Type=String />                <asp:Parameter Name="Grade"  Type=Int32 />                <asp:Parameter Name="ID1" Type=Int32 />            </UpdateParameters>

View 4 Replies View Related

Should This WHERE Clause Work?

Jan 16, 2008

Hi,I am having trouble with a WHERE clause:WHERE (([A] = @A) AND ([B] >= @B) AND (([C] < [D])) OR ([C] = 0 AND [D] = 0)) It's meant to only select data where A = @A, and B is more than or equal to @B, and one of the next two are true: C is less than D or C and D are both 0 Thanks,Jon 

View 3 Replies View Related

Why Would This Code Won't Work

Feb 21, 2008

I am trying to get the id of last entered record and I used select ID command but it doesn't give me the ID of last record enteredProtected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
Dim name, address, nice As String
Dim sConnString, sSQL, sID As String
Dim u As MembershipUsername = Me.name.Textaddress = Me.address.Text
 
u = Membership.GetUser(User.Identity.Name)
nice = u.ToString()sSQL = "INSERT into test ([Address],[Name], [username]) values ('" & _
address & "', '" & _name & "', '" & _
nice & "'); SELECT ID FROM test WHERE (ID = SCOPE_IDENTITY())"
MsgBox(sID)
MsgBox(sSQL)
sConnString = ConfigurationManager.ConnectionStrings("aspnetdbConnectionString1").ConnectionString.ToString()Using MyConnection As New System.Data.SqlClient.SqlConnection(sConnString)Dim MyCmd As New System.Data.SqlClient.SqlCommand(sSQL, MyConnection)
MyConnection.Open()
MyCmd.ExecuteNonQuery()
MyConnection.Close()
End UsingResponse.Redirect("transferred.aspx?value=2")
End Sub
End Class

View 2 Replies View Related

WHERE Clause Will Not Work

Feb 27, 2008

I am using the below WHERE clause and it will not filter out records where Companies.CompanyEmail = b@c.com
 WHERE (Companies.CompanyEmail <> 'a@a.com')  this does not work, is the @ causing a problem?  also tried 'a@a.com%' with no success.
WHERE (tblCompanies.C_CompanyEmail <> 'none')  this works fine.
Thank you
 
 

View 1 Replies View Related

My SQL Dataset Will Not Work!

May 2, 2008

For the life of me, I cant get this thing to work.. any insight would be greatly appreciated. What I'm trying to do is simply get the RealName field from my aspnetdb.Here the code.           SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=aspnetdb;Integrated Security=SSPI");                    SqlDataAdapter a = new SqlDataAdapter                    ("select RealName from dbo.aspnet_Users where UserName='Dude';", conn);                    DataSet s = new DataSet();                    a.Fill(s);                    foreach (DataRow dr in s.Tables[0].Rows)                    {                    getusersrealname.Text = (dr[0].ToString()); 

View 4 Replies View Related

Group By Won't Work??

May 30, 2008

can anyone explain why, when i do a group by clause on the following data....it has no effect?
Part          SubPart         Qty
120887     66743             83
120887     66743            100
120887     667443            25
553212     122987           119
553212     122987             67
here's my select statement:
select part, subpart sum(qty) from partdata group by part,subpart,qty
the resulting data looks identical to the original.
what i was expecting was a return of just two lines:
 
Part          SubPart         Qty
120887     66743             208
553212     122987           186
 

View 2 Replies View Related

Simple SP Won't Work, This Is Sad.

Dec 14, 2004

I am kicking myself, but cannot seem to get a simple stored procedure to return ANY records. I know it's soming that has to do with the Joins. Don't know what. I ran query analyzer and passed it a valid city and nothing was returned, but no errors either. If I run the query without any parameters, all the records are retrieved fine. ANY IDEAS?

CREATE PROCEDURE spUnitsbyCity
@city varchar
AS

SELECT A.unitcity, A.unitid, B.radioip, B.radiomac, C.videoserverip

FROM tbl_units as A

INNER JOIN tbl_radios as B ON A.unitid = B.unitid
INNER JOIN tbl_videoservers as C ON A.unitid = C.unitid

WHERE A.unitcity = @city
GO

View 2 Replies View Related

Why Won't My Sql Procedure Work?

Apr 13, 2005

Hi

For some reason my stored procedure is returning no results, when I
know it should be.  I am trying to take a textbox someone has
typed into and returning all names from the database which include that
string.  My SQL statement is

ALTER PROCEDURE getLecturerNames
(
    @lName as varchar(20)
)
AS
SELECT * FROM Lecturers
WHERE lName LIKE '%@lName%'

When I step into the procedure, the @lName parameter shows lName =
'ike' (what I typed to search) but no results are returned. 
However when I change the procedures last line  to :

WHERE lName LIKE '%ike%'

2 records are returned.  Is SQL server adding the quotation marks causing the problem, or if not what is?

View 2 Replies View Related

How To Work With Sql Parameters?

Jan 23, 2006

hi.
I am trying to use parameters in an sql statement, that runs inside a loop. every cycle I have to change the parameters values, and I'm not sure if I do it right.
I'm using the DefaultValue property like this:
SqlDataSource1.UpdateParameters["Text"].DefaultValue = txt;
is it the right way? (I had some errors when I did this, something like "value can not be truncated ")
thanks

View 1 Replies View Related

Why Does This Trigger Not Work?

Feb 28, 2006

why does this trigger not work? i'm winging this and hoping for some input. nobody's responded to my earlier posts. I get no errors, but no update either.
CREATE TRIGGER UpdateLineTotalON CartItemsFOR UPDATEASDECLARE @lineTotal Numeric(9)DECLARE @itemSell Numeric(9)DECLARE @pounds Numeric(9)SELECT * FROM CartItemsSET @lineTotal = @pounds * @itemSell

View 3 Replies View Related







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