|
nt_virus wrote: and I m puzzled by seeing such codes and cant find a way to make it work..
We can help if you get stuck, or provide a link to an article that sets you off in the right direction.
nt_virus wrote: I really need it ..
Within what timespan? Writing it yourself is an option, but if you don't know the language then it will take some effort and time.
Start out with writing a small prototype that reads data from a SQL Server table. Exporting the data back to Excel goes somewhat along the same route. If you get stuck with a particular piece o' code, or want explanation about something that you're puzzled about, check back here. Copy & paste the code into a new post, without the "please" and "I need it", and you'll get some helpfull answers.
Could be done in a couple o' days
I are troll
|
|
|
|
|
Hello. Thanks for the replies.
The below code works, it is made on Console Application.. but how to get the column names .. I m just getting only data..
namespace SqldataTable_to_Excel
{
class Program
{
static void Main(string[] args)
{
string path = @"C:\db.xls";
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
SqlConnection cn = new SqlConnection("Data Source=NT_VIRUS;Initial Catalog=test;Integrated Security=True");
SqlCommand cmd = new SqlCommand("SELECT * FROM planets", cn);
try
{
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
sw.WriteLine(dr["name"].ToString() + "\t" + dr["age"].ToString());
}
Console.WriteLine("Database has been exported.");
}
catch (Exception excpt)
{
Console.WriteLine(excpt.Message);
}
}
}
}
}
|
|
|
|
|
|
Thanks but I didn't understand .. how to apply this in my code.. could you please elaborate mate..
|
|
|
|
|
Ok, you really don't seem to know what you're doing. While CodeProject will help you when you get stuck on a problem or want advice, I don't think that anyone will hold your hand to walk you through the creation of your application. That's what books, schools, online posts (though you're confused by them), and mentors are for.
Eddy gave you SQL! If you don't know how to invoke it, then you have a lot more learning to do than I (or anyone else, I think) would want to provide to you.
First, figure out what you want to do. Then, try to learn something about it. Then, come back here and ask a better question than what distills to "Thanks for the code snippet, can you please write the rest of the code for me, too?"
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I are troll
|
|
|
|
|
i hav collection of items in combobox.when i press any key suppose to 'B' it should show all the collecton of items of B in drop list like in dropdownlist.
plz help me
|
|
|
|
|
Combobox does have an autocomplete property. Set that and autocomplete source.
Time is the best teacher; unfortunately it kills all of its students.
जय हिंद
|
|
|
|
|
Ya he is right. Set the autocomplete property and have fun . .
|
|
|
|
|
different names for the Windows Service being installed.
different configuration and data files using the same .EXE
using presentation layers.
Chandhu
|
|
|
|
|
and do you have a specific question?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Is it a haiku?
Different questions,
Different forums,
Same answers:
I are troll
|
|
|
|
|
LOL! Funniest... post... ever!
var question = (_2b || !(_2b));
|
|
|
|
|
Not funniest ever but damn funny stuff! here's a '5' for bringing the first laugh to my morning.
|
|
|
|
|
Don't repost your question. You didn't even respond to the previous threads reply.
Get your act together before you post here again, or pray I don't see it.
|
|
|
|
|
led mike wrote: or pray I don't see it
I think that would be the last of him Could you do this more regularly ?
|
|
|
|
|
Hi
I have a requirement as follows.
We have a series of applications all belong to a group(actually we have several groups with several applications in each group). So we have developed these applications of a particular group as a seperate projects and later added this projects to a single solution(that solution identified as a group).
Now as part of deployment of this applications we want to have a single setup.exe for each group and when user clicks setup.exe of a particular group he must be provided the option of the choosing applications belonging to that group and accodingly the installation should proceed in installing the corresponding applications of that group.
Kindly give me a suggestion for doing this
Thanks in advance
Regards,
Krishna Mohan.
|
|
|
|
|
Buy InstallShield
I are troll
|
|
|
|
|
Maybe you should consider using a single *.msi file with Features[^].
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
hi
I am doing an application which logs data received from another application.
Logs should be stored in an XML file.
I was planning to use XML schema in Visual Studio 'Add new item' option.
But I saw some examples using data set for manipulating XML.
In fact which is the better way?
thanks in advance
rgds
Fadi
|
|
|
|
|
Please emphasize how Page Up/Down key presses are supposed to work in a multicolumn listbox control. As in how should the scrolling take place... When the first item in a multicolumn listbox is selected and Page Down is pressed then which item should get highlighted
1 6 11
2 7 12
3 8 13
4 9
5 10
|
|
|
|
|
The item which is currently selected itself. If page-up then show all items of previous page and vice versa for page-down. I refer to "page" as the currently visible size(rows) of the listbox. To put it in context, I would expect page-up and page-down to behave like a scroll. I wouldn't want the current selected item to be lost on a scroll(or page-up/page-down)
Someone else might have a better opinion though.
|
|
|
|
|
If my list box looks like the following wherein 1-10 are visible and 6-20 can be viewed only when scrolled to the right.
1 6 |11 16
2 7 |12 17
3 8 |13 18
4 9 |14 19
5 10 |15 20
If 1 is the currently selected item and I press page down twice, first 10 is selected and then 19 is selected in my list box.
Is that the correct behaviour?
|
|
|
|
|
Looking at it select 10 first, I would think next should have been 20.
|
|
|
|
|
Hello,
Since a long time i had this question.
I want to know how to design my windows application forms like the design of Windows Media Player.
As per my knowledge Windows Media Player is also a Windows application and hence there must be some way they would have designed such beautifull curves and buttons.
Does Anyone know or can give me some link for more information on this.
Any help would be of great help.
Thanks in advance.
|
|
|
|