Click here to Skip to main content
16,009,577 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to display full column length in SQL Pin
Jon Hulatt6-Mar-03 3:38
Jon Hulatt6-Mar-03 3:38 
GeneralRe: How to display full column length in SQL Pin
IrishSonic6-Mar-03 11:13
IrishSonic6-Mar-03 11:13 
GeneralIntroduction of parameter problem!! Pin
Andrea Ferraro5-Mar-03 23:34
Andrea Ferraro5-Mar-03 23:34 
QuestionHow to use the same db connection with multiple datareaders? Pin
Segal5-Mar-03 11:22
Segal5-Mar-03 11:22 
AnswerRe: How to use the same db connection with multiple datareaders? Pin
Gertjan Schuurmans5-Mar-03 11:43
Gertjan Schuurmans5-Mar-03 11:43 
GeneralRe: How to use the same db connection with multiple datareaders? Pin
Gertjan Schuurmans5-Mar-03 11:45
Gertjan Schuurmans5-Mar-03 11:45 
AnswerRe: How to use the same db connection with multiple datareaders? Pin
andyharman5-Mar-03 11:53
professionalandyharman5-Mar-03 11:53 
GeneralRe: How to use the same db connection with multiple datareaders? Pin
Anonymous5-Mar-03 14:02
Anonymous5-Mar-03 14:02 
Thanks for replying! Initially what I did before is kind of as follows:

static void main()
{
....
func1();
....
}

static void func1()
{
....
string connectionstring = "...";
sqlconnection myconnection = new sqlconnection(connectionstring);
string sqlstr1 = "...";
sqlcommand mycommand = new sqlcommand(sqlstr1, myconnection);
myconnection.open()
sqldatareader myreader = mycommand.executereader();
string myvalue = "";
while (myreader.read()
{
myvalue = myreader["..."].tostring();
processThisValue(myvalue);
waitforresult(myvalue, connectionstring);
}
myreader.close();
myconnection.close();
}

static processThisValue(string myvalue)
{
..........
}

static void waitforresult(string inputvalue, string connectionstring)
{
sqlconnection myconnection2 = new sqlconnection(connectionstring);
string sqlstr2 = "select xxx from xxx when xxx=" + inputvalue;
sqlcommand mycommand2 = new sqlcommand(sqlstr2, myconnection2);
while (true)
{
myconnection2.open();
sqldatareader mydatareader2 = mycommand2.executereader();
string myvalue2 = "";
while (mydatareader2.read())
{
myvalue2 = mydatareader2["..."].toString();
}
if (myvalue2 == "...")
break;
}
mydatareader2.close();
myconnection2.close();
}

because of the cost for db connection is expensive, so I'm thinking to use one connection for 2 readers, etc. From your point of view, how should I simplify the above process? Thanks!
GeneralRe: How to use the same db connection with multiple datareaders? Pin
andyharman6-Mar-03 7:13
professionalandyharman6-Mar-03 7:13 
GeneralCreating a running totals column Pin
nicholas.gionfriddo5-Mar-03 7:32
nicholas.gionfriddo5-Mar-03 7:32 
GeneralRe: Creating a running totals column Pin
Chris LaQuerre5-Mar-03 10:09
Chris LaQuerre5-Mar-03 10:09 
GeneralRe: Creating a running totals column Pin
nicholas.gionfriddo5-Mar-03 10:27
nicholas.gionfriddo5-Mar-03 10:27 
GeneralRe: Creating a running totals column Pin
nicholas.gionfriddo5-Mar-03 10:49
nicholas.gionfriddo5-Mar-03 10:49 
GeneralRe: Creating a running totals column Pin
nicholas.gionfriddo5-Mar-03 10:52
nicholas.gionfriddo5-Mar-03 10:52 
GeneralRe: Creating a running totals column Pin
andyharman5-Mar-03 11:42
professionalandyharman5-Mar-03 11:42 
GeneralRe: Creating a running totals column Pin
nicholas.gionfriddo6-Mar-03 2:57
nicholas.gionfriddo6-Mar-03 2:57 
GeneralConnection Pooling with Oracle OleDb Provider Pin
Dr Herbie4-Mar-03 5:16
Dr Herbie4-Mar-03 5:16 
GeneralRe: Connection Pooling with Oracle OleDb Provider Pin
Mark Conger4-Mar-03 6:51
Mark Conger4-Mar-03 6:51 
GeneralSQLServer/MSDE Authentication Pin
Sassan Komeili Zadeh3-Mar-03 20:17
Sassan Komeili Zadeh3-Mar-03 20:17 
GeneralDeleting Rows From DataSet Pin
afronaut2-Mar-03 16:40
afronaut2-Mar-03 16:40 
GeneralRe: Deleting Rows From DataSet Pin
mughal2-Mar-03 20:19
mughal2-Mar-03 20:19 
GeneralRe: Deleting Rows From DataSet Pin
afronaut3-Mar-03 4:42
afronaut3-Mar-03 4:42 
QuestionADO.NET and Relational Data problem.....how start? Pin
gicio2-Mar-03 10:05
gicio2-Mar-03 10:05 
AnswerRe: ADO.NET and Relational Data problem.....how start? Pin
Bernard Vander Beken5-Mar-03 9:46
Bernard Vander Beken5-Mar-03 9:46 
Generalfetching backward Pin
Hesham Amin1-Mar-03 3:42
Hesham Amin1-Mar-03 3:42 

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.