-
daabase to textbox
hi, i have this SQL command, i would like to know, if i can get the result in a textbox? or label? or send it directly to mail? how?
Code:
SELECT [InputID], [ResID], [DriverID], [Datee], [Timee], [Pax], [Fromm], [Too], [Orig], [Transfer], [ac], [Company], [Charges], [Hrs], [Pt], [Fees], [Stopp], [Grat], [Other], [Total], [Comments], [SentTo], [Email], [Saveas], [Month], [Aff], [Name] FROM [inputt] WHERE ([ResID] = @ResID)
thx
-
Re: daabase to textbox
fill the tadatable using above query (from query seems return only 1 row) and assgin column value to textbox or label as
Code:
daAdapter.Fill(dtTable)
txtInputId.text = dtTable.rows(0).Items("InputID")
txtResId.text = dtTable.rows(0).Items("ResID")
and so on...
-
Re: daabase to textbox
i tgt maybe there was an easy way to do it, because i was using to send it via mail, name.text... . Isn't possible to send the table?
-
Re: daabase to textbox
you can directly send email from SQL server, thisArticle will help you.
-
Re: daabase to textbox
checked but not sending, it will save it as queue, do i need to have the enterprise manager, currently i'm on the express
-
Re: daabase to textbox
You mean it's being saved in c:\inetpub\mailroot? Then you probably need to have SMTP installed on your machine or you need to specify, in your code, an SMTP server to use.