|
It'd be faster to do this using Notepad++, since the column-title is only present on the first line of the CSV-file. That's also the easiest way to build your project; read the content of the file, replace the word, write it. Take a look at the classes in System.IO .
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If your purpose is to replace all data placed in a certain column (for example, the "phone number" field), you can do it programmatically.
The following function can be useful for that purpose:
' This function returns a token based on its place.
Public Function GetToken(new_txt As String, delimiter As String) As String
Static txt As String
Dim pos As Integer
' Save new text.
If new_txt <> "" Then txt = new_txt
pos = InStr(txt, delimiter)
If pos < 1 Then pos = Len(txt) + 1
GetToken = Left$(txt, pos - 1)
pos = Len(txt) - pos + 1 - Len(delimiter)
If pos < 1 Then
txt = ""
Else
txt = Right$(txt, pos)
End If
End Function
|
|
|
|
|
Hi, Please help me in checking the condition.I am displaying information in a html table.
I have two grids in asp and On click of first grid items it should be added to the second grid. Always items with same satus
we should add.
Example :I have 5 records in First grid.
No Status
== ======
1 closed
2 Open
3 Open
4 Open
5 Open
if I select different status records and click add button on the page it should throw an error message,
If I select same status then it shouldn't through an error message.
I have code like below. Here rs means the number of records in the second grid.
If rs.RecordCount > 0 Then
rs.MoveFirst
If trim(rs.Fields.Item("Status").Value) <> trim(grid.Columns.Item("Status").Value)
MsgBox "Items should be with same status."
Exit Function
End If
End If
Please let me know how to how to validate the above condition.
|
|
|
|
|
pls am in need of a code in visual basic on ant colony optimization,genetic algorithm and simulated annealing... thanks
|
|
|
|
|
Have you not tried Google?
Google Search[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
You need the code?? Why? So you can turn it in as your own work??
|
|
|
|
|
Dear Expert,
I have a Listview with subitem which i add populate data in listview which is lengthy, i want to shorten the code, i tried For loop but it give me error at run time. With Do loop it working.
Do Until rs.EOF = True
Set LI = ListView1.ListItems.Add(, , rs(0))
LI.SubItems(1) = rs(1)
LI.SubItems(2) = rs(2)
LI.SubItems(3) = rs(3)
LI.SubItems(4) = rs(4)
LI.SubItems(5) = rs(5)
LI.SubItems(6) = rs(6)
LI.SubItems(7) = rs(7)
LI.SubItems(8) = rs(8)
LI.SubItems(9) = rs(9)
LI.SubItems(10) = rs(10)
LI.SubItems(11) = rs(11)
LI.SubItems(12) = rs(12)
LI.SubItems(13) = rs(13)
LI.SubItems(14) = rs(14)
LI.SubItems(15) = rs(15)
LI.SubItems(16) = rs(16)
rs.MoveNext
Loop
|
|
|
|
|
LI.SubItems(i) = rs(x)
What is the value of i in this statement?
|
|
|
|
|
Dear Sir,
is this the right path to display listview subitems with for loop
Li.SubItems(x) = rs(x)
|
|
|
|
|
What happens when you try it?
|
|
|
|
|
Dear Sir,
It work. But i just want to know it will affect the other program when compile or not.
|
|
|
|
|
kurja-kurdoh wrote: i just want to know it will affect the other program In what way affect other program? All you are doing is adding items into a list.
|
|
|
|
|
Can you help me for the vbcode for the game grow island or grow valley ? Thanks !
|
|
|
|
|
Nope.
VB6 is dead and, from what I can find, Grow Island is a Flash game, not VB6. if you want to write it yourself, go right ahead. We're not going to do it for you.
|
|
|
|
|
i was looking for the code of upgrading or evolving an object to another or maybe animation for it what code can i use ?
|
|
|
|
|
That code is custom written for you game objects and environment noone is going to write it for you and you really haven't defined what you mean by an "evolving object".
Seriously, drop VB6 and use something more modern, like XNA studio, C#, C/C++, and pick up a bunch of books on game programming.
Oh! You'll find that NONE of them use VB6.
|
|
|
|
|
We have 2 VB.Net 2008 programs.
They are not 'related'.
They are in separate folders.
If I change a module in 1 via VisStudio and save it, then the other gets
This File has been modified outside the source editor.
The module is NOT in the Solutions Explorer of the 'victum' program.
It happens on more than 1 module and both ways but it does not seem to be for all modules.
How can I stop this form happening???
|
|
|
|
|
QuickBooksDev wrote: The module is NOT in the Solutions Explorer of the 'victum' program.
Close Visual Studio. Start Notepad and open the module. Add the text "Hello world".
Open solution A in Visual Studio. See if it contains the text "Hello world". Do the same for solution B. Chances are, the text will appear in both solutions. Correct?
|
|
|
|
|
I see what you mean. The modules are there but not in the solution explorer.
So I should be able to just x out of the 'misplaced' modules and that should do it.
Amazing that these modules do not show up even when you show all files.
Or am I missing something.
THanks
|
|
|
|
|
QuickBooksDev wrote: I see what you mean. The modules are there but not in the solution explorer.
That could happen when the module is in an assembly that's registered in the GAC, taking precedence over another copy. That doesn't explain why the IDE picks the code up as "changed".
Open the solution file (.sln, in the root of the project-directory) in notepad, and verify that it ain't the same files. Now and then I make a "link" instead of a copy when adding a file from another project - changing the file in one project would then cause the other IDE to "see" the changes and ask whether it should reload.
|
|
|
|
|
I think it happens if you double click on a file that goes to VisStudio. It adds the file to the solution but does not put it into the solution explorer for some reason.
I have looked at the sln in notepad before. I even did a Win 7 search of the folder (but of course the win7 search is not reliable). It was not there.
Doing the find on the text then x-ing out of the windows does fix it.
|
|
|
|
|
QuickBooksDev wrote: I think it happens if you double click on a file that goes to VisStudio. It adds the file to the solution
Not on my machine; had a solution open, double-clicked on a non-related sourcefile from another project. It opened, could be edited, but was not added to the solution, nor is the filename mentioned in the solution-file.
|
|
|
|
|
I have seen this before. I have a solution open and I want to view a vb module with notepad but I double click on the modules and it defaults to Vis Studio. That module is not 'in' the solution that I have opened. I have since changed the default program on .vb, etc. to Notepad but this is a 'new' machine and for the first few weeks it was not set.
Well I have no other idea how a module not related to a program can get into it, not be in the solution explorer.
Anyhow, you have help me solve the problem.
Thanks
|
|
|
|
|
Hi,
I am using VB6 With SQL Server 2005.
I am using below code to populate VB6 FlexGrid and it's working perfectly.
strSQL="Select * from <TABLE NAME>"
Set Grid1.DataSource = Nothing
Adodc1.ConnectionString = cnn
Adodc1.RecordSource = strSQL
Adodc1.Refresh
With Grid1
Set .DataSource = Adodc1
End With
Now i want execute Select Statement with Stored Procedure which have input parameter also.
What should i do to Get record with Stored Procedure.
Thanks in advance.
|
|
|
|
|
Yusuf Mohammad wrote: I am using VB6 With SQL Server 2005. VB6 is deprecated; meaning it's no longer sold, no longer supported, and no longer recommended for development. You'd best upgrade to VB.NET, which happens to be "free" (VB6 isn't)
Yusuf Mohammad wrote: What should i do to Get record with Stored Procedure. Like I said, VB6 is no longer supported. Still, the first Google result[^] explains how. Points to a nice CodeProject-article
|
|
|
|