|
text is not in memory ..its in original text file only.
|
|
|
|
|
Then do what everyone else said, and just use File.Copy
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I agree. I think File.Copy would be your best solutions if you want your text file to be exactly the same as the original.
modified on Wednesday, January 27, 2010 10:02 AM
|
|
|
|
|
i have 2 following solution
the first
sqlcommand1.commandText = "insert into customers values('firstName','lastName','phone')
SqlCommand1.ExecuteNonQuery()
the second
'fill into datagridview
SqlCommand1.CommandText = "select * from customers "
SqlDataAdapter1.SelectCommand = SqlCommand1
SqlDataAdapter1.Fill(DataSet1, "customers")
DataGridView1.DataSource = DataSet1
DataGridView1.DataMember = "customers"
'add new row into datatable
row = DataSet1.Tables("customers").NewRow()
row.Item(0) = "firstName"
row.Item(1) = "lastName"
row.Item(2) = "phone"
DataSet1.Tables("customers").Rows.Add(row)
'update data
SqlCommandBuilder1 = New SqlCommandBuilder(SqlDataAdapter1)
SqlCommand1.CommandText = "select * from customers "
SqlDataAdapter1.InsertCommand = SqlCommandBuilder1.GetInsertCommand
SqlDataAdapter1.Update(DataSet1, "customers")
Can you tell me what 's difference between those ?
And which is solution with higher performance
Thank you very much!!
|
|
|
|
|
These two are doing different things, You cant Compare them. I suggest you buy a Book
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I see a lot of this.
Clearly the first is better etc. Why bother filling a dataset in order to perform an insert? The second option will produce the same SQL at the end of the day, but at high cost in processing to generating something you can type yourself in seconds.
|
|
|
|
|
The first one is a little better than the second b/c your using a bit more processing power on your app server to create the dataset you have on the second. In the first, most of the processing will be performed on the database server which is optimized for doing such computations.
modified on Wednesday, January 27, 2010 10:01 AM
|
|
|
|
|
Dear All,
Could any body give me the line code for the given query.
1. If I am clicking mouse button on Row 1 column 3
then it will show in Msgbox "selected Column 3"
2. If I am clicking mouse button on Row 1 column 4
then it will show in Msgbox "selected Column 4"
.........so on.
Thanks
Ashish
|
|
|
|
|
Private Sub MSFlexGrid1_Click()
MsgBox CStr(MSFlexGrid1.Colsel)
End Sub
I are Troll
|
|
|
|
|
Hi,
The below code return 0 ,Even I click on 1,2.3 ...soon column
Private Sub MSFlexGrid1_Click()
MsgBox CStr(MSFlexGrid1.Colsel)
End Sub
Thanks
Ashish
|
|
|
|
|
Ashish Kumar Vyas wrote: The below code return 0 ,Even I click on 1,2.3 ...soon column
Ah, the selection isn't there yet when you click it, so one would have to check what column the mouse is on;
Private Sub MSFlexGrid1_Click()
MsgBox CStr(MSFlexGrid1.mousecol)
End Sub That should fix it
I are Troll
|
|
|
|
|
I Have made a program to set the master volume in XP, but with Vista and Seven this don't work. How to fix this with VB6? THanks!
|
|
|
|
|
You're going to have to do some more research on this, but here[^] is a start.
|
|
|
|
|
Experts i need your help!
I have a database with a search option when a record is selected i want the option for them to sign that record off (checkbox type thing) however at the moment the database seems to be ONLY READ only???
How can i make it so i can initially add bits and pieces to the record or if worse come to worse delete that record?
Many thanks
Dan
|
|
|
|
|
Make the database not "read-only"
|
|
|
|
|
What type of database? SQL Server, MySql, Access, etc...
|
|
|
|
|
i managed to figure it out near enough, thanks any way
|
|
|
|
|
Dan Why VB6
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hello all...
i am trying to develop a project in VB.Net as front end and MySQL or SQL server as back end.
The application is called online music sharing application which is supposed to work on LAN
All i need is that on the request of client or the keyword he types( which can be the name of singer, album or song name) is then searched in the database located at the server and so the list of files matching with the keyword is listed at the client side application.
Later the client can download any of the files among the list and listen to it
..
Here i would also admit that i have worked on VB but never on VB.Net and have no idea of, how the downloading feature and searching will be implemented.
I need to submit this project in say a week or 10 days(fully extended period and i cant take more time...)
i request if there is any help i can get as soon as possible.......
Thankyou...
|
|
|
|
|
Euphoric_me wrote: I need to submit this project in say a week or 10 days(fully extended period and i cant take more time...)
Why would you take a project that you have no experience in, and then rely on us to (probably) complete the entire thing for you if you don't understand simple concepts like executing a search? on a DATABASE no less? I'd go back and seriously explain to the client your technical constraints and have him choose another candidate.
If this is for school, you're SOL. Maybe business school next time? I hear you can coast through that...
[Edit] What kind of help did you think you where going to get exactly?
|
|
|
|
|
Do you have the database structure?
If so, does the database already contain data?
Have you worked with DB queries in your VB development?
|
|
|
|
|
Note the type and quality of the other questions answered here, not one will be a can you build this app for me. The people who get a positive response are people who are trying and learning to program.
You should try business school as suggested, or possibly sales, you are obviously incapable of becoming a programmer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Is it even legal to share music across a LAN? What about copyright?
Mind you, you are obviously incapable of developing such a system, so it may not matter
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hey Guys,
is it possible to raise a custom event after I pressed left/right windows-key and the startmenu is opening up? I want to start a procedure of my application when startmenu is showing up and end the procedure when startmenu is closing.
Regards
|
|
|
|
|
There is no event for the Start menu popping up. I don't know how you're going to detect that.
|
|
|
|