Click here to Skip to main content
15,887,917 members
Home / Discussions / C#
   

C#

 
QuestionSimple Q about multidimension array .. plz Help Pin
legend_of_zanado11-Aug-07 9:07
legend_of_zanado11-Aug-07 9:07 
AnswerRe: Simple Q about multidimension array .. plz Help Pin
ScottM111-Aug-07 10:47
ScottM111-Aug-07 10:47 
GeneralRe: Simple Q about multidimension array .. plz Help Pin
Justin.Jones11-Aug-07 18:08
Justin.Jones11-Aug-07 18:08 
GeneralRe: Simple Q about multidimension array .. plz Help Pin
ScottM112-Aug-07 19:56
ScottM112-Aug-07 19:56 
QuestionNeed help with Sqldatareader Pin
erikhjerpe11-Aug-07 6:33
erikhjerpe11-Aug-07 6:33 
AnswerRe: Need help with Sqldatareader Pin
chinaQI11-Aug-07 7:10
chinaQI11-Aug-07 7:10 
GeneralRe: Need help with Sqldatareader Pin
erikhjerpe11-Aug-07 7:26
erikhjerpe11-Aug-07 7:26 
AnswerRe: Need help with Sqldatareader Pin
Colin Angus Mackay11-Aug-07 8:20
Colin Angus Mackay11-Aug-07 8:20 
erikhjerpe wrote:
If that is correct, Is it possible to establish a connection to the sql database in "program.cs" and get your reader to read the whole table and then let different windowsForms make sql questions to that reader?


No. A reader is a one-time-forward-only view of the data that is being retrieved from the database. Once a row has been read from the reader you cannot go back and read it again.

You may wish to look into DataAdapters in order to Fill a DataSet with the data which you can store in a central location and allow the forms to access.


erikhjerpe wrote:
Here is an example of code in my Form


It is unwise to access data dirctly from a form.


erikhjerpe wrote:
cmd = new SqlCommand("SELECT * FROM BinMonitor Where Departure !<" + "'" + textBox1.Text + "'" + "order by Departure ASC", conn);
reader


This code is susceptable to SQL Injection Attacks. Please read up on SQL Injection Attacks and Tips on How to Prevent Them[^]


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."


My website

GeneralRe: Need help with Sqldatareader Pin
erikhjerpe11-Aug-07 8:47
erikhjerpe11-Aug-07 8:47 
GeneralRe: Need help with Sqldatareader Pin
Colin Angus Mackay11-Aug-07 8:54
Colin Angus Mackay11-Aug-07 8:54 
GeneralRe: Need help with Sqldatareader Pin
erikhjerpe11-Aug-07 9:09
erikhjerpe11-Aug-07 9:09 
GeneralRe: Need help with Sqldatareader Pin
Justin.Jones11-Aug-07 18:01
Justin.Jones11-Aug-07 18:01 
Questionupdating javascript value to database Pin
dsaikrishna11-Aug-07 2:03
dsaikrishna11-Aug-07 2:03 
AnswerRe: updating javascript value to database Pin
Guffa11-Aug-07 2:27
Guffa11-Aug-07 2:27 
GeneralRe: updating javascript value to database Pin
dsaikrishna11-Aug-07 2:36
dsaikrishna11-Aug-07 2:36 
GeneralRe: updating javascript value to database Pin
Justin.Jones11-Aug-07 18:14
Justin.Jones11-Aug-07 18:14 
AnswerRe: updating javascript value to database Pin
Michael Sync12-Aug-07 3:56
Michael Sync12-Aug-07 3:56 
Questionhi friends , do any one know how to create crystal reports Pin
prasadbuddhika11-Aug-07 0:06
prasadbuddhika11-Aug-07 0:06 
AnswerRe: hi friends , do any one know how to create crystal reports Pin
Rami Said Abd Alhalim11-Aug-07 1:43
Rami Said Abd Alhalim11-Aug-07 1:43 
QuestionRead a value from another form ! Pin
mrkeivan10-Aug-07 21:25
mrkeivan10-Aug-07 21:25 
AnswerRe: Read a value from another form ! Pin
Hessam Jalali10-Aug-07 21:49
Hessam Jalali10-Aug-07 21:49 
AnswerRe: Read a value from another form ! Pin
Giorgi Dalakishvili10-Aug-07 22:16
mentorGiorgi Dalakishvili10-Aug-07 22:16 
AnswerRe: Read a value from another form ! Pin
Michael Sync12-Aug-07 4:04
Michael Sync12-Aug-07 4:04 
Questionmdi parent form Pin
monuSaini10-Aug-07 20:09
monuSaini10-Aug-07 20:09 
AnswerRe: mdi parent form Pin
Hessam Jalali10-Aug-07 20:36
Hessam Jalali10-Aug-07 20:36 

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.