Click here to Skip to main content
15,918,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Some Times Tab container is not displaying Pin
Manas Bhardwaj24-Jul-09 22:46
professionalManas Bhardwaj24-Jul-09 22:46 
QuestionUpdate Pin
KhandelwalA24-Jul-09 19:19
KhandelwalA24-Jul-09 19:19 
QuestionValidating login control Pin
janani1324-Jul-09 19:04
janani1324-Jul-09 19:04 
AnswerRe: Validating login control Pin
dan!sh 24-Jul-09 21:25
professional dan!sh 24-Jul-09 21:25 
QuestionMultiple Code Files in ASP.NET Project Pin
MarkMokris24-Jul-09 10:55
MarkMokris24-Jul-09 10:55 
AnswerRe: Multiple Code Files in ASP.NET Project Pin
Christian Graus24-Jul-09 11:14
protectorChristian Graus24-Jul-09 11:14 
Question[Message Deleted] Pin
mjc22524-Jul-09 7:55
mjc22524-Jul-09 7:55 
AnswerRe: Querying by with a variable for Date/Time in the Where clause Pin
Christian Graus24-Jul-09 11:18
protectorChristian Graus24-Jul-09 11:18 
mjc225 wrote:
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM Events WHERE ([EventStartDate]>=StartDateExport) AND EventEndDate>=#12/1/2009#", cn); //This doesn't work.


Of course it doesn't. You're missing something pretty basic. When you put something in quotes, it's a literal. You're passing the word StartDateExport, instead of passing the value of the variable of the same name.

OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM Events WHERE ([EventStartDate]>= " + StartDateExport + ") AND EventEndDate>=#12/1/2009#", cn);

If you don't understand how to concatenate strings, I'd suggest you should work through a basic C# book before going further.

Depending on where your dates come from, it's possible you will have a massive security hole in your site, due to SQL injection attacks. In any case, for you to put this in your page load is terrible design ( really, it's no design at all ). If you're teaching yourself or doing a class, it's probably fine, but if anyone is paying for this code then they are paying too much.

Christian Graus

Driven to the arms of OSX by Vista.

Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

Questionproblem with Bind Pin
Sider8924-Jul-09 7:33
Sider8924-Jul-09 7:33 
AnswerRe: problem with Bind Pin
Abhijit Jana24-Jul-09 7:38
professionalAbhijit Jana24-Jul-09 7:38 
AnswerRe: problem with Bind Pin
Brij24-Jul-09 7:42
mentorBrij24-Jul-09 7:42 
AnswerRe: problem with Bind Pin
Sider8924-Jul-09 7:51
Sider8924-Jul-09 7:51 
GeneralRe: problem with Bind Pin
Abhijit Jana24-Jul-09 7:53
professionalAbhijit Jana24-Jul-09 7:53 
GeneralRe: problem with Bind Pin
Sider8924-Jul-09 7:59
Sider8924-Jul-09 7:59 
GeneralRe: problem with Bind Pin
Christian Graus24-Jul-09 11:28
protectorChristian Graus24-Jul-09 11:28 
GeneralRe: problem with Bind Pin
Blue_Boy24-Jul-09 7:54
Blue_Boy24-Jul-09 7:54 
Questionexpression resolve Pin
sekannak24-Jul-09 4:33
sekannak24-Jul-09 4:33 
AnswerRe: expression resolve Pin
Abhishek Sur24-Jul-09 4:38
professionalAbhishek Sur24-Jul-09 4:38 
AnswerRe: expression resolve Pin
Mike Ellison24-Jul-09 4:40
Mike Ellison24-Jul-09 4:40 
QuestionDisplay html file in web page as a thumbnail? Pin
Brian W King24-Jul-09 4:02
Brian W King24-Jul-09 4:02 
AnswerRe: Display html file in web page as a thumbnail? Pin
Mike Ellison24-Jul-09 4:29
Mike Ellison24-Jul-09 4:29 
AnswerRe: Display html file in web page as a thumbnail? Pin
Abhishek Sur24-Jul-09 4:36
professionalAbhishek Sur24-Jul-09 4:36 
QuestionUnit testing in Asp.net MVC Pin
vid nandha24-Jul-09 2:39
vid nandha24-Jul-09 2:39 
AnswerRe: Unit testing in Asp.net MVC Pin
Abhijit Jana24-Jul-09 2:49
professionalAbhijit Jana24-Jul-09 2:49 
GeneralRe: Unit testing in Asp.net MVC Pin
vid nandha24-Jul-09 3:18
vid nandha24-Jul-09 3:18 

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.