Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Wednesday, March 28, 2012

how to assign ConnectionString to a SqlDataSource within the namespace?

hi

i am trying to assignConnectionString to aSqlDataSource within thenamespace but i am getting this error

plz advise

Object reference not set to an instance of an object.

namespace myNameSpace
{

public partial class NRP : System.Web.UI.Page
{

SqlDataSource sds1;


protected void Page_PreInit(object sender, EventArgs e)
{
sds1= new SqlDataSource();
sds1.ID = "sds1";
this.Controls.Add(sds1);

sds1.ConnectionString = ConfigurationManager.ConnectionStrings["my_conn_str"].ToString();

}
}
}

namespace myNameSpace
{

public partial class NRP : System.Web.UI.Page
{


protected void Page_PreInit(object sender, EventArgs e)
{
SqlDataSource sds1= new SqlDataSource();
sds1.ID = "sds1";
this.Controls.Add(sds1);

sds1.ConnectionString = ConfigurationManager.ConnectionStrings["my_conn_str"].ToString();

}
}
}

Monday, March 19, 2012

How to add SQL 3.5 in Visual Studio prerequisites ?

Hi!

I want to deploy an application that require the SQL Server Compact Edition 3.5 to be installed..... and I want to deploy my application with ClickOnce!

But, the problem is that I can't select "SQL Server Compact Edition" in the prerequisites of the Visual Studio Project properties... ?

Do you have a solution ?

thx!

SQL Server Compact 3.5 pre-requisite shows up in Visual Studio 2008 Beta 2. The Beta 2 can be downloaded from

http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Regards

Ambrish

How to add SQL 3.5 in Visual Studio prerequisites ?

Hi!

I want to deploy an application that require the SQL Server Compact Edition 3.5 to be installed..... and I want to deploy my application with ClickOnce!

But, the problem is that I can't select "SQL Server Compact Edition" in the prerequisites of the Visual Studio Project properties... ?

Do you have a solution ?

thx!

SQL Server Compact 3.5 pre-requisite shows up in Visual Studio 2008 Beta 2. The Beta 2 can be downloaded from

http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Regards

Ambrish

Monday, March 12, 2012

How to add message to sql server log?

Hi!
I use MSSQL 2000. I want add message to sql server log, i use raiserror with
log and it works, but it add unnecessary message about error, severity and
state. How can i add only my message? Thanks!
Best regards, Konstantin Knyazevtry using xp_logevent
"Konstantin Knyazev" <kknyazev_no_spam_@.mail.ru> wrote in message
news:eJUjx6FRGHA.224@.TK2MSFTNGP10.phx.gbl...
> Hi!
> I use MSSQL 2000. I want add message to sql server log, i use raiserror
> with
> log and it works, but it add unnecessary message about error, severity and
> state. How can i add only my message? Thanks!
> Best regards, Konstantin Knyazev
>|||xp_logevent also adds second message about error.
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:%23JzAU%23FRGHA.5296@.tk2msftngp13.phx.gbl...
> try using xp_logevent
>
> "Konstantin Knyazev" <kknyazev_no_spam_@.mail.ru> wrote in message
> news:eJUjx6FRGHA.224@.TK2MSFTNGP10.phx.gbl...
and
>

how to add job to sqlserver

hi
i want to add job that runs on a specific time of the day in sqlserver 2005 how?

thanks in advance.

In SQL Server Express you cannot because the Agent that runs Jobs the automation subsystem is not included with Express. If you look you will find tools developed by other developer to do it, some for free others sell it, another option you can buy 2000 and use the Agent to run it. Hope this helps.

|||Yes, SQL Server Agent not included in SQL Server Express, look at these options for planing and starting jobs:

http://www.sqldbatips.com/showarticle.asp?ID=29
http://www.sqldbatips.com/showarticle.asp?ID=27
http://www.codeproject.com/useritems/SQLAgent.asp
http://www.lazycoding.com/products.aspx

You might see that these alternatives are driven by private projects and are not supported by Microsoft but do their job.

Jens K. Suessmeyer.

http://www.sqlserver2005.de