|
Yes, error appears while im in (build) step in install shield
|
|
|
|
|
Haha, what did the error say? Could be helpfull information
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I got 3 error messages:
1- "Error: -7184: the filename column of the file table includes characters that aren't available on code page 1252 "
2- "Error: -7184: the value column of the MsiAssemblyName table includes characters that aren't available on code page 1252 "
3- "Error: -7185: the English (united States) translation for string identifier IDS_SHORTCUT_DISPLAY_NAME1 includes characters that aren't available on code page 1252 "
I use arabic letters in coding and it's necessary to use it
|
|
|
|
|
|
Good, now how to Enable "Build UTF-8 Database" in "Releases" > (YourReleaseName) > "Build"-Tab ?
|
|
|
|
|
Dunno, would be something specific to InstallShield.
I for one don't like unicode characters in a path, and there's no way you can convince me that you "need" it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm using entity framework with a visual studio 2013 application and SQL Server 2008R2. I have a table on the database :
id == name == quantity
1----- nm1---- 3
2------nm2---- 7
Now , I have this code
Dim query1 as ienumerable(of Table1)
query1=(From t in context.table1 where t.quantity>0 select t).Tolist
query1.First.quantity-=3
query1=(From t in context.table1 where t.quantity>0 select t).Tolist
Now, in the first line, query1 contains 2 objects nm1 and nm2 with quantity 3 and 7.
In the third line, query1 contains 2 objects nm1 and nm2 , but nm1 has quantity 0.
My question is :
-If the query on third line get the items from the database , the nm1 should have the quantity=3. Why this item has quantity 0?
-If the query on third line get the items from the local cache , should not contain nm1 at all because on the local cache nm1 has the quantity=0 and the query has the clause t.quantity>0.
Thank you!
|
|
|
|
|
Welcome to the wonderfully over-complicated world of Entity Framework!
The answer is actually somewhere in between the two: EF loads the matching entities from the database, which is why nm1 is returned; but when it sees that it's trying to load an entity that's already in the local cache, it ignores the data returned from the database, and returns the cached item instead.
There are various ways to work around this documented here:
Entity Framework Cache Busting | Codethug[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you !
But what I want is to read the modified values , but I want that the query include the where clause , so in other words I just want to have on query results only nm2.
So how can I force to load from cache with the where clause.
|
|
|
|
|
If you only want to query the entities which have already been loaded into memory, then you can query the DbSet(TEntity).Local property[^]:
query1 = (From t In context.table1 Where t.quantity > 0 Select t).ToList()
query1.First().Quantity -= 3
query1 = (From t In context.table1.Local Where t.quantity > 0 Select t).ToList()
However, this will not load any new entities which have been added to the database since your first query.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I have a datatable that contains some detailed data in a report, and I need to summarize the data. Depending on the report, the column names changes and I have a settings table that contains the column name, and if the column must be grouped by, summed, or counted. There can be various columns that needs to be grouped and summed. how would I go about doing this, baring in mind that this needs to be dynamically...
For example Report 1 has a account, year, month, qty, amount column. Based on the settings, I need to group by account, year, month and sum the qty and amount.
|
|
|
|
|
Build an SQL statement.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I need to use the datatable that already has the data s the user can filter it - then I need to display a summary based on the data and user input. I do not want to retrieve the data from the server again.
|
|
|
|
|
Retrieve the entire table and use the filter-functions from the datatable.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to add header to my csv file how please help me
Dim parsedData = New List(Of String())()
Using sr = New StreamReader("H:/test.csv")
Dim line As String
line = sr.ReadLine()
Do While line IsNot Nothing
Dim row() As String = line.Split(","c)
parsedData.Add(row)
line = sr.ReadLine()
Loop
End Using
DataGridView1.ColumnCount = 6
For i As Integer = 0 To 5
Dim sb = New StringBuilder(parsedData(0)(i))
sb.Replace("_"c, " "c)
sb.Replace("""", " ")
DataGridView1.Columns(i).Name = sb.ToString()
Next i
For Each row As String() In parsedData
DataGridView1.Rows.Add(row)
Next row
DataGridView1.Rows.Remove(DataGridView1.Rows(0))
|
|
|
|
|
Great problem description.
You're "reading" the CSV file but want to "add" a header to it.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Why are you using the parsedData object? That just adds complexity to your code. The actual method only needs the following logic:
1. Read the first line of the csv file (assuming it contains the header labels), and use the fields from that to set your DataGridView headers.
2. Read the remaining lines one by one, and use them to fill the data rows of the dgv.
|
|
|
|
|
I Have no idea what happened here. I finally just deleted the whole project and started
over. I recreated the old code a little at a time and now everything works. I am sorry for
this post. If anyone has ever encountered this problem I would be interested in what happened
so I don't do it again.
Again, sorry.
I do not know why I have never encountered this before but here goes.
I have created a new windows forms project called MyProject.
I create a new UserControl within the project called Test.vb the normal way:
1. Right click MyProject
2. Click Add + UserControl
I do not modify the control in any way.
Compile and build is ok.
I drag the new 'Test' control from the toolbox to the main form and save.
The designer saves the Test control with these entries:
Friend WithEvents Test1 as MyProject.Test
Private Sub InitializeComponent()
Me.Test1 = new MyProject.Test
... plus other normal initialization
End Sub
For some reason the compiler does not recognize the 'MyProject.Test' control as
part of the project. It indicates that 'Test' is 'not defined'. If I change the declaration in
the MyProject.Designer.vb 'Test' without 'MyProject.' reference, the compiler builds with
no errors.
However the next time I edit the form, the designer saves the control
the same way; ie. MyProject.Test.
Why does the compiler not recognize Test as part of MyProject.Test?
thank you
-- modified 27-Jan-18 5:07am.
|
|
|
|
|
I am trying to make a simple score card by entering the score for each player for each round in a lbl_round.text and then having each round show in a Lbl_total.text
Problem is, if player 1 in round 1 scores 7 all is fine round1.text shows 7 and total.text shows 7 but when I come again to player 1, round score may be 6 which should show in total score as 13 but instead I get 76. Below is the code:
Static counter = 0
Dim labels = {Lbl_roundscore1, Lbl_roundscore2, Lbl_roundscore3, Lbl_roundscore4}
Dim totals = {Lbl_total1, Lbl_total2, Lbl_total3, Lbl_total4}
labels(counter).Text = Txt_input.Text
totals(counter).Text = totals(counter).Text + labels(counter).Text
Txt_input.Text = String.Empty
counter = If(counter = labels.Count - 1, 0, counter + 1)
|
|
|
|
|
If you "add" strings then you really expand them - that means :
the Result of adding "7" and "6" is "76". That is what your code does.
What you want to have is adding the numeric values - so you should cast each string perhaps to an Integer and add them now. Finally you convert the Integer-Value back into your Result ...
|
|
|
|
|
Ralf Meier wrote: you should cast each string perhaps to an Integer
You can't "cast" a string to an integer; you need to parse it.
Int32.TryParse[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
oO ... I wrote cast and I meant convert - but I think it's clear what I tried to say ... 
|
|
|
|
|
Thanks Ralf for taking the time to answer will look in to what you suggest.
|
|
|
|
|
This is the kind of problem you get when using controls to store your game state.
DON'T DO THAT! Controls are there to SHOW and EDIT your data, not to hold it for you.
Maintain your values (state) in a class, or other appropriate storage, such as a structure, designed for the purpose. The controls can then get their values from the game state storage. Doing this also frees you from parsing or casting data back and forth.
|
|
|
|
|
Well excuse me Dave for being the fool, only just started with VB so will go away and try to decipher what it is you are trying to tell me.
|
|
|
|