|
My application was tested and almost ready to go to production, but seems to have gone wacky in the past day or two. Nothing seems to work correctly. I put a breakpoint into the program and during debugging VS came up with a message box "The source file has changed. It no longer matches the version of the file used to build the application being debugged.".
The only changes I've made the past few days were touchups to stored procedures that were renamed when we put them into production. I've tinkered around with the versioning with the publish feature.
Did I goof something up??? Has anyone encountered this error before, and if so, how did you fix your app???
Lost in the vast sea of .NET
|
|
|
|
|
Yes i have also observed this issue many times. The solution worked for me is in the Solution Explorer, Right Click your project solution and click rebuild solution.
Hope this helps
Mubashir
|
|
|
|
|
I think I might be able to help you I have also made this same mistake.
I accidently renamed the file outside vb.net eg (I went into mydocuments/ visual studios) and then i renamed the application i was developing. So visual basic .net could not find the file to save to. when you try to create a new program have you noticed that you have to create a name for it well when you do this it creates a file in your directory where all your programs are saved when they are in the development phase. The way to fix this is to either go back and change the file to it's orignal file name(the easiest way) or you will either have to restart creating it or you could try save as which might allow you to create another folder for the program you are developing.
I hope this helps
Ps I am sorry if this doesn't apply to youre problem.
|
|
|
|
|
Thanks for everyone's feedback. I didn't change the name of my project and the error eventually went away and I don't have a clue what I did wrong in the first place, or what I did to fix it.
My project is working fine now. Something was out of whack, but now it is working without a problem. If the problem comes up again, I'll keep your suggestions in mind.
Thanks!!!
Lost in the vast sea of .NET
|
|
|
|
|
i have a question:
how to make sorting when the user clicks on the header of a listview
i made a list view of many columns but i want to make sorting of the data by columns
when he clicks the header of column i - the data in the listview should be sorted by this column - i.
|
|
|
|
|
Here is a class to sort a listview. Just pass the index of the column and the listview when creating a new instance of the class.
Public Class CompareListViewItems
Implements IComparer
Shared bSortDirection As Boolean = True
Dim sRoutineToUse As String = "String"
Dim lView As ListView 'the listview in question
Dim iColumn As Integer 'the column to sort
Dim lvCollection As ListView.ListViewItemCollection
Dim bSafeToSort As Boolean = False
Sub New(ByVal itemIndex As Integer, ByVal lvListView As ListView)
iColumn = itemIndex
lView = lvListView
bSortDirection = Not bSortDirection
lvCollection = New ListView.ListViewItemCollection(lvListView)
determineType()
End Sub
Private Function determineType() As Boolean
'There needs to be at least 2 elements to sort --
If (lView.Items.Count < 2) Then
bSafeToSort = False
Return False
End If
'If a value is Null, a subitem might not be added
If (checkForNull() = True) Then
bSafeToSort = False
Return False
End If
'If there are values in each element, lets determine the type
If (isItADate() = True) Then
sRoutineToUse = "Date"
ElseIf (isItANumber() = True) Then
sRoutineToUse = "Number"
Else
sRoutineToUse = "String"
End If
End Function
Private Function checkForNull() As Boolean
Dim lvTest As ListViewItem
Dim sItemContents As String
For Each lvTest In lvCollection
Try
If iColumn = 0 Then
sItemContents = lvTest.Text
Else
sItemContents = lvTest.SubItems(iColumn).Text
End If
Catch
Return True
End Try
Next
bSafeToSort = True
Return False 'we are good to go
End Function
Private Function isItADate() As Boolean
'-- Is it a date? --
Dim lvTest As ListViewItem 'assigned a new row
Dim oObjectToTest As Object 'recipient of the assignment
Dim sItemContents As String 'contents of the element
'-- Loop through each element
For Each lvTest In lvCollection
If iColumn = 0 Then
sItemContents = lvTest.Text
Else
sItemContents = lvTest.SubItems(iColumn).Text
End If
Try
oObjectToTest = CDate(sItemContents)
Catch
Return False
End Try
Next
Return True
End Function
Private Function isItANumber() As Boolean
Dim lvTest As ListViewItem 'assigned a new row
Dim oObjectToTest As Object 'recipient of the assignment
Dim sItemContents As String 'contents of the element
'-- Loop through each element
For Each lvTest In lvCollection
If iColumn = 0 Then
sItemContents = lvTest.Text
Else
sItemContents = lvTest.SubItems(iColumn).Text
End If
Try
oObjectToTest = CDbl(sItemContents)
Catch
Return False
End Try
Next
Return True
End Function
Function compare(ByVal oFirst As Object, ByVal oSecond As Object) As Integer _
Implements System.Collections.IComparer.Compare
If bSafeToSort = False Then Exit Function
Dim lvElement1 As ListViewItem = CType(oFirst, ListViewItem)
Dim lvElement2 As ListViewItem = CType(oSecond, ListViewItem)
If sRoutineToUse = "String" Then
If bSortDirection = True Then
If iColumn = 0 Then
Return String.Compare(lvElement1.Text, lvElement2.Text)
Else
Return String.Compare(lvElement1.SubItems(iColumn).Text, _
lvElement2.SubItems(iColumn).Text)
End If
Else
If iColumn = 0 Then
Return String.Compare(lvElement2.Text, lvElement1.Text)
Else
Return String.Compare(lvElement2.SubItems(iColumn).Text, _
lvElement1.SubItems(iColumn).Text)
End If
End If
ElseIf sRoutineToUse = "Number" Then
If bSortDirection = True Then
If iColumn = 0 Then
Return Math.Sign(CLng(lvElement1.Text - lvElement2.Text))
Else
Return Math.Sign(CLng(lvElement1.SubItems(iColumn).Text _
- lvElement2.SubItems(iColumn).Text))
End If
Else
If iColumn = 0 Then
Return Math.Sign(CLng(lvElement2.Text - lvElement1.Text))
Else
Return Math.Sign(CLng(lvElement2.SubItems(iColumn).Text _
- lvElement1.SubItems(iColumn).Text))
End If
End If
Else 'Its a date
If bSortDirection = True Then
If iColumn = 0 Then
Return Date.Compare(Date.Parse(lvElement1.Text), _
Date.Parse(lvElement2.Text))
Else
Return Date.Compare(Date.Parse(lvElement1.SubItems(iColumn).Text), _
Date.Parse(lvElement2.SubItems(iColumn).Text))
End If
Else
If iColumn = 0 Then
Return Date.Compare(Date.Parse(lvElement2.Text), _
Date.Parse(lvElement1.Text))
Else
Return Date.Compare(Date.Parse(lvElement2.SubItems(iColumn).Text), _
Date.Parse(lvElement1.SubItems(iColumn).Text))
End If
End If
End If
End Function
End Class
|
|
|
|
|
thanks man
i did that, but i don't know why it didn't work
Private Sub ListView1_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles ListView1.ColumnClick
Dim a As New Eye_Salary.CompareListViewItems(e.Column.ToString, Me.ListView1)
End Sub
|
|
|
|
|
man i read the class
the fuction compare wasn't use
i didn't find a call for it
it should contain a loop on the items i think and make comparaison then a sorting
|
|
|
|
|
Just do this:
Private Sub ListView1_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles ListView1.ColumnClick
ListView1.ListViewItemSorter = New CompareListViewItems(e.Column, ListView1)
End Sub
My mistake
Sorry
|
|
|
|
|
try this one. it is much simplier
Private Sub LV_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
With LV
.SortKey = ColumnHeader.Index - 1
.SortOrder = lvwAscending
.Sorted = True
End With
End Sub
geboy
|
|
|
|
|
Hello,
making progress in trying to get atlas working...But not quite there yet...
To populate the dropdownlists from a database:
Public Function populateProjectDDL()
Dim knownCategoryValues As String
Dim category As String
(...)
(Filled my dataset called ds1.)
For Each datarowitem As DataRow In ds1.Tables(0).Rows
?!?!?!?!
Next
return ?!?!?!
end function
What do I return, how do i fill the whatever i return?
(http://atlas.asp.net/atlastoolkit/Walkthrough/CCDWithDB.aspx[^]
was trying to follow that example but they lost me in the c++)
Please help me? (asp.net forum mods won't let my posts appear)
|
|
|
|
|
Made progress...:
<webmethod()> _
Public Function populateProjectDDL(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameValue()
'Dim knownCategoryValues As String
'Dim category As String
'Which projects to show:
If Session("admin") = 1 Then
ds1 = dbComponent1.selectOneCondition("Project", "active", 1)
'info1.InnerText = "As admin, you see inactive projects, wells, sections and Drilling units as well."
Else
Dim querystr = "SELECT DISTINCT P.project_id, P.project_name FROM Project as P, UserRole as UR WHERE "
querystr = querystr + "UR.user_id = " & Session("active_user") & " AND "
querystr = querystr + "UR.project_id = P.project_id AND "
querystr = querystr + "P.active = 1"
ds1 = dbComponent1.query(querystr)
End If
Dim objTable As System.Data.DataTable
objTable = ds1.Tables(0)
If ds1.Tables(0).Rows.Count > 0 Then 'user cannot set defaults
With objTable
Dim intRow As Integer
Dim values As List(Of CascadingDropDownNameValue) = New List(Of CascadingDropDownNameValue)
For intRow = 0 To .Rows.Count - 1
values.Add(New CascadingDropDownNameValue(.Rows(intRow).Item("project_name").ToString, .Rows(intRow).Item("project_id")))
Next
Return values.ToArray
End With
Return New CascadingDropDownNameValue() {}
'Return knownCategoryValues
'Return category
Else
Return Nothing
End If
ds1.Clear()
End Function
Now [method error 500] in the project drop down...
|
|
|
|
|
Solved:
Solution:
include the populate of first drop down in aspx page, don't specify a servicepath for the first one, like this:
<WebMethod()> _
Public Function populateProjectDDLPageMethod(ByVal knownCategoryValues As String, ByVal category As String) As AtlasControlToolkit.CascadingDropDownNameValue()
(...)
|
|
|
|
|
My Task Is: Converting Raw Excel data to Sql Server Database.
Now i am taking my excel sheet data into Dataset, my major problem is my excel column has mixed data like, in column 1: Test, column2: 22/8/2006, Column 3: 226689.25, The total column i want to put into same column in the sqlserver, my dataset reads the data from excel sheet, it sets the datatype what first column has, that is String type, but the remaining data in the same column (ie) dates, rupees are considering as '0'(Zeros),
What is solution for this. Please help me
Regards
Murthy
|
|
|
|
|
i want to develop a telecom software in which the raw date of the call records(like trunk no,extn no,dialing no,call duration etc..)are to be extracted from the PBX by an interfacing data cable. the raw data can be recovered from the hyper termina by using a system defined function in vb.net
so i want to know about the system defined function & its usr for this purpose.
how to set this program as start up program so that when mu pc starts the program will automatically run
any queries/helps in this regard will be warmly solicited
i m pradip kishore from india,working in vb.net & asp.net
|
|
|
|
|
Hello
how to oblige, the user, to select all the row in the datagrid, not a unique cell, so i want to make the grid view like the listview.
|
|
|
|
|
hi
try this:
put this line in the dataGrid.CurrentCellChanged event
dataGrid.Select(grdUser.CurrentCell.RowNumber)
Tamimi - Code
|
|
|
|
|
yes man i did that
but the problem was that the current cell is selected too, what i need is to select only the row
u get it ?
|
|
|
|
|
hi
try this:
grid.Select(grid.CurrentCell.RowNumber)
Dim gc As New DataGridCell(grid.CurrentCell.RowNumber, -1)
grid.CurrentCell = gc
Tamimi - Code
|
|
|
|
|
this is the method i think but in this way the cell of the column 0 is selected not the -1 and if i made 2 the cell 1 is the selected cell
- ihave 2 columns : 0 and 1
but my friend
if u can answare this question the situation will be better :
how to make sorting when the user clicks on the header of a listview
i made a list view of many columns but i want to make sorting of the data by columns
when he clicks the header of column i - the data in the listview should be sorted by this column - i.
|
|
|
|
|
hi hasan
i don't think that i understode you last message !!!!!!!!!!
and i test the code in my last msg , and its work correctly , make sure that you are putting the code in the CurrentCellChanged
excuse me i never did sorting with a listview
Tamimi - Code
|
|
|
|
|
thanks man
i solved the problem
thanks alot
|
|
|
|
|
Hello
I am working in a project. I need to export the crytal reporst to excel format.The file is exported sucessfully but the problem is that it leaves some of the lines blank between the records. If every one have solution about it plz let me know.
Regards
Atif
|
|
|
|
|
just you have to attach that sections below line to the report fields to do not get blank line in exported excel file of your report
thanks and regards
|
|
|
|
|
hi...
i hav a problem to un-highlite the repeater/datagrid row after highlighting it...i used the onclick control
example :
<td align="center" class="t_row" id="r7">
<asp:Button id="btnFee" runat="server" Text="Fee" CssClass="btn" CommandName="fee" OnClick="Highlite"></asp:Button>
</td>
when the button is click; the row will be highlighted..but the problem is..the row will not un-highlight if i click another button in another row
could u please help me????
mada mada dane
|
|
|
|