|
Do you want to insert the whole file into a field in the table? Or is your file a table (like a csv-file)?
First you have to write database access code to get a connection to the db...
Regards
Sebastian
|
|
|
|
|
|
For sql server
BLUK INSERT
For Oracle
SQLLDR
For MYSQL
INFILE
Use This Keywords to Search in Google.
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
I find that some C# project is compiled with the makefile, so i want to know why use the makefile to compile it. Is it a best way to improve the programming skills?
What compiler do you use?
|
|
|
|
|
It makes no difference as far as I know, its generally down to the site standards and source control methods.
Fired.Fish.Gmail wrote: Is it a best way to improve the programming skills?
No, its not really that relevant any more than say using IE or FF for a browser.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Fired.Fish.Gmail wrote: What compiler do you use?
The compiler doesn't change whether you use a MakeFile, the IDE or an MSBuild project. It's always going to be csc.exe (for C#).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I Have seen the csc.exe file.
Thanks.
|
|
|
|
|
Hy,
I'm designing an application that accesses SQL Server from C#. I have a form that runs first where i select the sql server and database. When i click a button it's should assign the hostname and database for the connection string, close and open another form (the main application). The problem is when the select form closes, the main form appears for 1 sec and then the whole application closes. I've ran the app step by step, everything is ok, the variables are assigned but it automaticly calls the dispose method for the second form.
This is the code from the first form that runs at app start (selectserver form)
private void btnSelectServer_Click(object sender, EventArgs e)
{
<<assign values from control boxes>>
frmMain main = new frmMain();
main.Show();
this.Close();
}
|
|
|
|
|
1. In main entry point use your MainForm in Application.Run(new YourMainForm)
2. In your main form load event call your Sql Server Form Setting with showdialog and verify the settings
3. Close your Sql Server Form Setting.
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
But this way the main form would be loaded first. And I want to load the server form only, and if selected the appropriate server+database, close it and open the main form.
|
|
|
|
|
in main entry of your application use this
using (SqlServerForm sqlServerForm = new SqlServerForm())
{
if (sqlServerForm.ShowDialog() == DialogResult.OK)
{
Application.Run(new frmMain());
}
}
piticcotoc wrote: and if selected the appropriate server+database
set the dialog result of sqlserverform to OK to close the form
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
Change:
private void btnSelectServer_Click(object sender, EventArgs e)
{
<<assign values from control boxes>>
frmMain main = new frmMain();
main.Show();
this.Hide();
}
-------
Nguyen Dai Duong
Ha Noi University of Technology
daiduongbk@gmail.com
|
|
|
|
|
Hi,
I am needed to implement an inventory control module but should I apply ORM for it? For the case, if I create a change (e.g. transfer from one warehouse to another warehouse), then the loaded stock value may be change by other, so how to use ORM for this case? or should not use ORM for this case?
Thanks
|
|
|
|
|
I don't see any difference in using an ORM for this or not. ORM are just a kind of tool to prevent you from writing database access code (insert/delete/update).
The question is not really clear. Maybe you could describe your requirements in more detail?
Regards
Sebastian
|
|
|
|
|
In my thinking of using ORM for inventory control, it should be get a stock, minus the request quantity, and then update to the database.
so if
inventory = 6
pc a = 6,
pc b = 6,
then pc a request to remove 2 items and process the value = 4 and then update to db,
but pc b keep the value = 6 and then remove 3 items, and the update to db,
it seen to be value = 3 in the inventory, it's about the concurrency control, how to let it better?
Thanks
|
|
|
|
|
Hi.
I want to know how you make an space between a statement in the code.
for example when i write Console.Writeline("I am john");
i want to leave some space between that statement and the next statement.
how u format it to leave some space between the lines?????
thanks.
|
|
|
|
|
you can writeline (string.empty); or you can put \n in the string (I think)
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Environment.NewLine
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Or even Console.WriteLine(string.Empty);
Duh.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Old age does these things Chris. Not that I'm implying that you old.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
use "system.environment.newline";
wqqwqw
|
|
|
|
|
Please help, encounter the following problem.
I am not able to serialize a custom member in my class that is inherited from collection base.
Samples class:
[Serializable()]
public class Ques
{
public string Descriptions = "";
public string Answer = "";
public Ques(){}
.
.
.
}
[Serializable()]
public class Questions : CollectionBase
{
public string QuestionSetVer = "";
public Questions(){}
public Ques this[int index] { get { return (Ques)List[index]; } set { List[index] = value; } }
.
.
.
}
[Serializable()]
public class Test
{
public Test(){}
private Questions QuestionsCol ;
[XmlArrayItem(typeof(Ques))]
public Questions QuestionsCol
{
get { return QuestionsCol; }
set { QuestionsCol = value;}
}
.
.
.
}
I am able to serialize using XML, but the prob is "QuestionSetVer" will not be part of the XML element.
Hope that someone can help me out on this.
Thanks
|
|
|
|
|
Have you tried assigning a value to QuestionSetVer ? e.g. public string QuestionSetVer = "1.0";
BTW are you inheriting from CollectionBase for a specific reason? It is not Type-safe and will come back to bite you in the end.
If you use generics it all becomes much simpler.
Replacing:
[Serializable()]
public class Questions : CollectionBase
{
public string QuestionSetVer = "";
public Questions(){}
public Ques this[int index] { get { return (Ques)List[index]; } set { List[index] = value; } }
.
.
.
}
with
[Serializable()]
public class Questions : List<ques>
{
private string questionSetVer = "";
.
.
.
public string QuestionSetVer
{
get
{
return this.questionSetVer;
}
set
{
this.questionSetVer = value;
}
}
}
</ques>
will make your life easier in the long run. Notice also that I have replaced your public field with a private field and a public property, so as to conform to the data-hiding principles of OOP.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi friends
Could u plz any body help me to exexcute my exe without windows login. I want to run my C# login Exe before windows log on screen apperas.
|
|
|
|
|
Too bad.
The dll you need to replace is C++
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|