Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Thursday, March 29, 2012

error: 'Dts' does not exist in the namespace 'Microsoft.Sqlserver'

I tried to create a package from a C# program, and I copied this from SQL server online book:

using Microsoft.Sqlserver.Dts.Runtime;

But I got compilation error:
The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.Sqlserver'(are you missing an asssembly reference?)
What am I missing?

Thanks a lot

Have you, in fact, set a reference to Microsoft.SqlServer.ManagedDTS ? This is the assembly that contains the Dts.Runtime namespace.

-Doug
|||How do I set a reference to ManagedDTS? by writting:
using Microsoft.SqlServer.ManagedDTS
?

In this case ManagedDTS can not be found by compiler

Thanks for the hint
|||Please consult the Books Online for support. For example, the following article mentions what DLLs need to be registered:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/e44bcc70-32d3-43e8-a84b-29aef819d5d3.htm
regards,
ash|||found the solution: from visual studio, click Project->Add reference, then browse the assembly ManagedDTS.dll at directory c:\program files\microsoft sql server\90\SDK\Assemblies, this willl add ManagedDTS.dll to the project and solve the problem.

Thanks everyone!|||

Hello,

if you get this problem on your server. build your site in release mode and then you have this dll in your bin\release folder.

Either find this DLL and upload that in your server bin directory manually

error: 'Dts' does not exist in the namespace 'Microsoft.Sqlserver'

I tried to create a package from a C# program, and I copied this from SQL server online book:

using Microsoft.Sqlserver.Dts.Runtime;

But I got compilation error:
The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.Sqlserver'(are you missing an asssembly reference?)
What am I missing?

Thanks a lotHave you, in fact, set a reference to Microsoft.SqlServer.ManagedDTS ? This is the assembly that contains the Dts.Runtime namespace.

-Doug|||How do I set a reference to ManagedDTS? by writting:
using Microsoft.SqlServer.ManagedDTS
?

In this case ManagedDTS can not be found by compiler

Thanks for the hint|||Please consult the Books Online for support. For example, the following article mentions what DLLs need to be registered:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/e44bcc70-32d3-43e8-a84b-29aef819d5d3.htm
regards,
ash|||found the solution: from visual studio, click Project->Add reference, then browse the assembly ManagedDTS.dll at directory c:\program files\microsoft sql server\90\SDK\Assemblies, this willl add ManagedDTS.dll to the project and solve the problem.

Thanks everyone!|||

Hello,

if you get this problem on your server. build your site in release mode and then you have this dll in your bin\release folder.

Either find this DLL and upload that in your server bin directory manually

Sunday, February 26, 2012

error with c# select statement

hi i have copied this from my other page where it works fine and i cant understand what is going wrong! maybe one of your guys can point out what i cant see! herei s my code

string strOrderID = Request.QueryString["orderID"].ToString();

int intOrderID =Convert.ToInt32(strOrderID);

int intCustID =Convert.ToInt32(Request.QueryString["qsnOrderCustID"].ToString());

lblCustomerID.Text = Request.QueryString["qsnOrderCustID"].ToString();lblOrderID.Text = Request.QueryString["orderID"].ToString();

SqlConnection myConn =newSqlConnection("Data Source=xxxx;Initial Catalog=xxxx;User ID=xxxx;Password=xxxx");

//This is the sql statement.

string sql ="SELECT [del_address], [del_post_code], [del_time] From tbl_del WHERE order_ID = " + intOrderID;

//This creates a sql command which executes the sql statement.

SqlCommand sqlCmd =newSqlCommand(sql, myConn);

myConn.Open();

SqlDataReader dr = sqlCmd.ExecuteReader();

//This reads the first result from the sqlReader

dr.Read();

try

{

lblDelTime.Text =Convert.ToString(dr["del_time"].ToString);

lblDelAddy.Text = dr["del_address"].ToString();

lblDelPCode.Text = dr["del_post_code"].ToString();if (lblDelAddy.Text !="")

{

lblDelDate.Visible =true;

lblDelTime.Visible =true;

Label1.Visible =true;

Label2.Visible =true;

}

}

catch (Exception except)

{

lblerror.Text =Convert.ToString(except);

}

Regards

Jez

What error are you getting?

|||

try

{

lblDelTime.Text =Convert.ToString(dr["del_time"].ToString);

lblDelAddy.Text = dr["del_address"].ToString();

lblDelPCode.Text = dr["del_post_code"].ToString();if (lblDelAddy.Text !="")

{

lblDelDate.Visible =true;

lblDelTime.Visible =true;

Label1.Visible =true;Label2.Visible =true;

}

}

catch (Exception except)

{

lblerror.Text =Convert.ToString(except);

}

I can only find the above problem in the code...if you can name the error it will be more helpful for us.

|||

i realised that i was being a complete idiot (thats what being up for to long does! makes you miss the obvious!) i took a look at the bigger picture, it said that the textbox wasnt being filled, so maybe a problem with the data reader, no, but because i have 2 data readers on one page and i just copied and pasted the code, i forgot to put dr2[" instead of dr["

Wednesday, February 15, 2012

Error while executing nested DTS Packages...

Hello
We ran into a peculiar problem. We copied all of our DTS packages
from one server to another server (both of which run SQL 2000 and are
on the same Service Pack 3/3a). When we execute an embedded DTS
package from within anothe DTS package, we get the following error:

Error Title: Server Busy
Error Description: This action cannot be completed because the othe
program is busy. Choose 'Switch To' to activate the busy program and
correct the problem.

Buttons Available: Swith To..., Retry
Buttons Disabled: Cancel

Does any one know about this error and what to do about it?

Thanks
Jagannathan Santhanam (Jags)"Jagannathan Santhanam" <jags_32@.yahoo.com> wrote in message
news:605df08e.0309081332.73615acb@.posting.google.c om...
> Hello
> We ran into a peculiar problem. We copied all of our DTS packages
> from one server to another server (both of which run SQL 2000 and are
> on the same Service Pack 3/3a). When we execute an embedded DTS
> package from within anothe DTS package, we get the following error:
> Error Title: Server Busy
> Error Description: This action cannot be completed because the othe
> program is busy. Choose 'Switch To' to activate the busy program and
> correct the problem.
> Buttons Available: Swith To..., Retry
> Buttons Disabled: Cancel
> Does any one know about this error and what to do about it?
> Thanks
> Jagannathan Santhanam (Jags)

I've no idea what causes the error, but a search on Google found a few
similar cases. They seem to be related to ActiveX DLL problems. That's not
much to go on, but it might be something to investigate:

http://groups.google.com/groups?hl=...ram&sa=N&tab=wg

Simon