Click here to Skip to main content
15,914,289 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWindows Installer - Preparing to Install? Pin
AliAmjad19-May-09 18:16
AliAmjad19-May-09 18:16 
AnswerRe: Windows Installer - Preparing to Install? Pin
Ramesh Swaminathan19-May-09 19:23
Ramesh Swaminathan19-May-09 19:23 
QuestionEdit part of multi-upload file board. Pin
lsh486love19-May-09 15:16
lsh486love19-May-09 15:16 
QuestionAJAX call: JSON/WCF vs ASPX Pin
devvvy19-May-09 15:08
devvvy19-May-09 15:08 
QuestionSession Transfer between Classic ASP and ASP.Net Pin
medasatheesh19-May-09 10:00
medasatheesh19-May-09 10:00 
AnswerRe: Session Transfer between Classic ASP and ASP.Net Pin
Christian Graus19-May-09 12:27
protectorChristian Graus19-May-09 12:27 
GeneralRe: Session Transfer between Classic ASP and ASP.Net Pin
medasatheesh20-May-09 3:29
medasatheesh20-May-09 3:29 
Questiondatabase connection Pin
jainiraj19-May-09 7:01
jainiraj19-May-09 7:01 
I have a database in sql server named as "stock" in which "custdetails" is a table which has various fields.
I have connection string as-

ConString = "Data Source=localhost;Initial Catalog=stock;Integrated Security=true";

and two method selecct and update as-

public DataTable select(String query)
{
DataSet ds = new DataSet();
SqlDataAdapter adp = new SqlDataAdapter(query, ConString);
adp.Fill(ds);
return (ds.Tables[0]);
}
public void update(String query)
{
DataSet ds = new DataSet();
SqlDataAdapter adp = new SqlDataAdapter(query, ConString);
adp.Fill(ds);


Now I have a button.when buton is clicked i want to take data from database.But it is not retrieved. I have cheked it by printing it in a textbox.the code is as follow-

DataTable dt=new DataTable();
common obj=new common();
dt = obj.select("select * from custdetails");
TextBox2.Text = dt.Rows.Count.ToString();
TextBox1.Text = dt.Rows[1][1].ToString();

It is not working.what problem can be????
plz help me.......
AnswerRe: database connection Pin
MidwestLimey19-May-09 7:48
professionalMidwestLimey19-May-09 7:48 
AnswerRe: database connection Pin
Manas Bhardwaj19-May-09 9:30
professionalManas Bhardwaj19-May-09 9:30 
AnswerRe: database connection Pin
padmanabhan N19-May-09 15:22
padmanabhan N19-May-09 15:22 
GeneralRe: database connection Pin
MidwestLimey20-May-09 5:09
professionalMidwestLimey20-May-09 5:09 
GeneralRe: database connection Pin
padmanabhan N20-May-09 15:39
padmanabhan N20-May-09 15:39 
QuestionInternet Explorer cannot download file from server Pin
Biju Sam19-May-09 5:19
Biju Sam19-May-09 5:19 
QuestionRequest autentication for Web Service (WSDL) Pin
ryn00419-May-09 5:06
ryn00419-May-09 5:06 
QuestionDataGrid to Excel Pin
Civic0619-May-09 4:44
Civic0619-May-09 4:44 
AnswerRe: DataGrid to Excel Pin
Manas Bhardwaj19-May-09 4:49
professionalManas Bhardwaj19-May-09 4:49 
GeneralRe: DataGrid to Excel Pin
Civic0619-May-09 5:02
Civic0619-May-09 5:02 
Questionhow can I make controls wrap down on resizing page? Pin
SRKSHOME19-May-09 4:09
SRKSHOME19-May-09 4:09 
AnswerRe: how can I make controls wrap down on resizing page? Pin
blsong19-May-09 21:14
blsong19-May-09 21:14 
QuestionWeb Control Library (User Control) Pin
rains197919-May-09 2:51
rains197919-May-09 2:51 
AnswerRe: Web Control Library (User Control) Pin
Manas Bhardwaj19-May-09 2:57
professionalManas Bhardwaj19-May-09 2:57 
GeneralRe: Web Control Library (User Control) Pin
rains197919-May-09 3:18
rains197919-May-09 3:18 
QuestionUser Comments Pin
Feddo0419-May-09 2:43
Feddo0419-May-09 2:43 
AnswerRe: User Comments Pin
EliottA19-May-09 2:43
EliottA19-May-09 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.