Showing posts with label methods. Show all posts
Showing posts with label methods. Show all posts

Wednesday, March 7, 2012

An DatasetMethod

I have a dataset. And I have made 2 methods extra..DeleterQuery(@.id) and the oter one is UpdateQuery(@.naam,@.tussenvoegsel,@.achternaam,@.adres).

My question is how can I get one of these methods at an button and inputbox or something??

Hi khalidelmeknesi ,

Frist question, what are those 2 methods, are they stored procedures or something (well, they looks like stored procedures)? And if it's table adapter functins, you can call it just like any other build-in table adapter functions (e.g. update, getdata,insert...etc) after you have instantialized the tableadapter.

My question is how can I get one of these methods at an button and inputbox or something??

Not sure what you mean by this. But in case if you mean you want to call those 2 stored procedure in your button click event handler, I think it should be easy to implement. For example:

protected void Button1_Click(object sender, EventArgs e) {using (SqlConnection con =new SqlConnection(your_connectionstring_here)) { SqlCommand cmd =new SqlCommand(method_name, con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@.your_parameters", Parameter_value); //I guess maybe you mean the parameter value comes from inputbox in your webpage, right? con.Open(); cmd.ExecuteNonQuery(); } }
Hope my suggestion helps

Sunday, February 12, 2012

Alternative to xp_sendmail on 64 Bit SQL Server 2000

I'm looking for any alternative methods that can be used in place of the
xp_sendmail extended stored procedure when running on a 64 bit machine with
the 64 bit version of SQL Server 2000.
Any proven suggestions would be extremely helpful.
Not sure if this can help:
http://www.sqldev.net/xp/xpsmtp.htm
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Gordon Radley" <GordonRadley@.discussions.microsoft.com> wrote in message
news:DF298AAC-3340-47E4-BFA4-5006512B070D@.microsoft.com...
> I'm looking for any alternative methods that can be used in place of the
> xp_sendmail extended stored procedure when running on a 64 bit machine
> with
> the 64 bit version of SQL Server 2000.
> Any proven suggestions would be extremely helpful.
|||xp_smtp_sendmail doesn't work (probably because it's compiled for win32).
If anybody find a solution please tell me too.
"Gordon Radley" <GordonRadley@.discussions.microsoft.com> wrote in message
news:DF298AAC-3340-47E4-BFA4-5006512B070D@.microsoft.com...
> I'm looking for any alternative methods that can be used in place of the
> xp_sendmail extended stored procedure when running on a 64 bit machine
> with
> the 64 bit version of SQL Server 2000.
> Any proven suggestions would be extremely helpful.