|
your query is looking wrong
try this one
string query = "SELECT code, description, start_date, start_time, venue FROM Event WHERE start_date = '" + dropdownDay.SelectedIndex.ToString() + "' - '" + dropdownMonth.SelectedIndex.ToString() + "' - '" + dropdownYear.SelectedIndex.ToString() + "'";
Becoming Programmer...
|
|
|
|
|
thanks for the fast reply.
there isn't any error now, but i encounter some problems displaying my result in the gridview table.
when i run it, it doesn't displays any table/data at all, unlike my previous 'search by description' which is able to display out.
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" + Server.MapPath("myFile..mdb") + ";");
conn.Open();
string query = "SELECT code, description, start_date, start_time, venue FROM Event WHERE start_date = '" + dropdownDay.SelectedIndex.ToString() + "' - '" + dropdownMonth.SelectedIndex.ToString() + "' - '" + dropdownYear.SelectedIndex.ToString() + "'";
OleDbDataAdapter comm = new OleDbDataAdapter(query, conn);
DataSet ds = new DataSet();
comm.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
@__@ could you kindly guide me on this part?
thanks alot..
|
|
|
|
|
How can i read sqlconnection string from a text file.
|
|
|
|
|
tr_thorn wrote: How can i read sqlconnection string from a text file.
Why would you want to do that? You would typically store connection strings in the ConnectionStrings section of your app.config/web.config.
If you must read it from a text file, use the ReadAllText[^] method.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
use System.IO.File.ReadAllText or System.IO.File.ReadAllLines
hope it will help
Becoming Programmer...
|
|
|
|
|
can anyone gimme an example?
i m using windows forms c#.
|
|
|
|
|
SqlConnection dataConnection = new SqlConnection();
string connection = File.ReadAllText(filepath);
dataConnection.ConnectionString=connection;
hope it will help
Becoming Programmer...
|
|
|
|
|
|
I have a DataGrid Object and I've binded a data set to it. It works correctly but I want to change caption on column header but those is always name of field in database please help me to change it thanks.
Agh
|
|
|
|
|
May be you can change the sql used for binding...
for example,you could change "select id from user" into "select id as '<%=what you want%>' from user "...
I am not sure you get my meaning for my bad english.
My home:http://hi.baidu.com/dotnetcampus
|
|
|
|
|
hi,
I want to run a delphi application, but Just-in-time debugger of VS 2005 shows and don't permit to run it.
how can I temporarily disable it?
Best wishes
|
|
|
|
|
|
Google for the AeDebug registry key.
|
|
|
|
|
hi there,
i want to set my own size to page setup dialog before showing
for example:
i want to set size to "A4" instead of "Letter"
i tried it by this line:
pageSetupDialog1.PageSettings.PaperSize.Kind = System.Drawing.Printing.PaperKind.A4;
but it gave error that its read only
anyone know how can i do that?
thanks
Becoming Programmer...
|
|
|
|
|
How to determine programmatically if Framework 2.0 Full trust is set in trusted sites or not?
|
|
|
|
|
I'm not a CAS expert, but can you decorate a method with [PermissionSet(SecurityAction.Demand, Name = "FullTrust")], then call that method? If the method throws a security exception, you're not running in full trust.
|
|
|
|
|
there is many program that show source code in dll file. But I know you can do something to privent them to see your source code in dll file.
by the way , I cant see my comment when I create an instance of a class when I use dll file instead of source code. when I use source code( for example: class.cs) there is no problem.I can see comments. but when I use Class.dll, I cant see comment.
please guide me.
thanks
mehran
|
|
|
|
|
mohandesmehran wrote: there is many program that show source code in dll file. But I know you can do something to privent them to see your source code in dll file
Try obfuscating the dll file.
mohandesmehran wrote: I cant see my comment when I create an instance of a class when I use dll file instead of source code
What comment don't you see? The summary of the method?
I will use Google before asking dumb questions
|
|
|
|
|
yes. I cant see summary.please help me more about dll file.
thanks
|
|
|
|
|
In the compiler options somewhere is an option to generate an XML file, find it, and click it.
This will turn all your summaries and whatnot, into an XML file, which is read when you use your DLL in another project. Just remember to have the xml file in the same place as the dll.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
I couldnt find this file. please guide me!
|
|
|
|
|
As Andrei said, ofuscating prevents your codes to be decomplied (to some extent).
But remember that when you use the source of the dll (i.e. class.cs) in your project file, in fact no dll is built!! The source code is compiled and linked into your executable file!!
This is where the difference comes from.
|
|
|
|
|
I create my dll file in Class Library Project and use that Dll file in my asp.net web application.
I dont know anything about "ofuscating" please guide me more.
|
|
|
|
|
mohandesmehran wrote: I dont know anything about "ofuscating" please guide me more.
Google it. There are many different tools out there to help obfuscate your code.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi.
in DateTime.Now , Now is a property. But when we set a dot after Now we can see a list of methods and properties, such as DateTime.Now.AddDay() , DateTime.Now.Date , DateTime.Now.AddMonth()
how can I do it?
thanks
mehran
|
|
|
|