|
Ok, let me try to explain my dilemma. I have a VBApp that I can't republish due to another issue, but the crystal report in the app, that is published on our server needs a very minor tweak.
When published, where is the .rpt file put? I'd like to just change the .rpt file with the modification we need without republishing.
I found config data in the c:\users\nameofuser\appdata\local\apps\2.0\data directory, but no sign of where the .rpt file gets put.
Any idea where VS.Net puts this?
Lost in the vast sea of .NET
modified 27-Oct-22 13:06pm.
|
|
|
|
|
There won't be a standard location. If it's not within the published application folder, then you'll need to check the code to see where it loads the reports from.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello every one;
the below Code is to update Parent and Child table,
the relationship between tables was set to (Relation only) on Data Designer,
But on SQL Server, Update and Delete Rule set to (Cascade)
with this setup Parent table was Updating ok,
but child table return (Added/Modified) changes as nothing and did not get update
I tried all cases to Set (Update-Delete-Accept/Reject) relationship Rules On Dataset Designer but did not solve the issue
Could advise what to do here
thanks in advance
ParentTableBindingSource.EndEdit
Dim My_Parent_Modified As DataTable = DataSet1.ParentTable.GetChanges(DataRowState.Modified)
Dim My_Parent_Added As DataTable = DataSet1.ParentTable.GetChanges(DataRowState.Added)
Dim My_Parent_Deleted As DataTable = DataSet1.ParentTable.GetChanges(DataRowState.Deleted)
If My_Parent_ Modified Is Nothing = False Then
End if
If My_Parent_ Added Is Nothing = False Then
End if
If My_Parent_Deleted Is Nothing = False Then
End if
DataSet1.ParentTable.AcceptChanges
ChildTableBindingSource.EndEdit
Dim My_Child_Modified As DataTable = DataSet1.ChildTable.GetChanges(DataRowState.Modified)
Dim My_Child_Added As DataTable = DataSet1.ChildTable.GetChanges(DataRowState.Added)
Dim My_Child_Deleted As DataTable = DataSet1.ChildTable.GetChanges(DataRowState.Deleted)
If My_Child_ Modified Is Nothing = False Then
End if
If My_Child_ Added Is Nothing = False Then
End if
If My_Child_Deleted Is Nothing = False Then
End if
DataSet1.ChildTable.AcceptChanges
Imad
modified 27-Oct-22 7:02am.
|
|
|
|
|
|
Sorry Confused already delete fronm there
|
|
|
|
|
I want to add "wake the computer to run this task" scheduled task in condition tab in vbscript
|
|
|
|
|
Problème de mise à jour liée aux élément interdépendants de ma table
Bonjour chers membres du forum, j’ai une préoccupation qui est liée à la mise à jour de ma table.
En effet j’ai conçu une application vb.net pour la gestion des opérations de caisse pour le compte
d’une structure et tout fonctionne correctement jusqu’au niveau de la modification de la table où j’ai un bémol.
Le truc c’est qu’une opération est soit une recette ou une dépense d’où j’ai créé une variable
solde = recette - dépense (recette ou dépense est nulle selon la nature de l’opération) qui représente le solde
de chaque opération effectuée.
Pour ce qui est de la part du solde de la caisse à partir d’une opération op2 on a:
E: solde_caisse_op2 = solde_op2 + solde_caisse_op1 ( égal à solde_op1) et cela fonctionne bien en insertion.
Mon problème est que sur par exemple 10 opérations effectuées on décide de modifier la 5ème opération,
comment réajuster le solde de la caisse à partir de la ligne modifiée jusqu’au dernier élément de la table
solde_caisse, vu que les différentes lignes sont dépendantes pour le calcul des différentes soldes
de la caisse d’après l’équation E.
J’ai déjà réfléchi à une solution mais qui me donne une FatalError. En effet j’ai procédé comme suit:
Imports MySql.Data
Imports MySql.Data.Entity
Imports MySql.Data.MySqlClient
Imports MySql.Data.Types
Public solde_operation As Integer = 0
Public MaxId As Integer
Public j As Integer
Public soldecaisse As Integer
Public i As MySqlParameter
Private Sub GetMaxId()
connecter()
Dim sql As String
sql = "(SELECT MAX(Id_operation) FROM tbl_operation)"
Dim query As New MySqlCommand()
query = New MySqlCommand(sql, connecter)
MaxId = Val(query.ExecuteScalar())
connecter.close()
End Sub
Private Sub GetSoldeCaisse()
connecter()
Dim sql As String
sql = "select ((select Solde_operation from tbl_operation where Id_operation = @i) + (select Solde_operation from tbl_operation where Id_operation = @i-1))"
Dim query As New MySqlCommand()
query = New MySqlCommand(sql, connecter)
i = New MySqlParameter("@i", j)
soldecaisse = Val(query.ExecuteScalar())
connecter.close()
End Sub
Private Sub UpdateSolde()
connecter()
GetMaxId()
Dim sql As String
sql = "UPDATE tbl_operation SET Solde_operation = soldecaisse WHERE Id_operation = @i"
i = New MySqlParameter("@i", j)
Dim query As New MySqlCommand()
For j = Val(txt_num_operation.Text) To MaxId
GetSoldeCaisse()
query = New MySqlCommand(sql, connecter)
Next
connecter.close()
End Sub
En résumé la méthode GetMaxId() lors de son appel renvoie l'id_max de la table opération et cette valeur servira
de condition d'arrêt dans la boucle.
Ensuite la méthode GetSoldeCaisse(), quant à elle calcule le solde de la caisse au cours d'une opération donnée.
Enfin, la méthode UpdateSolde() qui sera appelée juste après celle qui effectuera la modification de la ligne
concernée, nous recalcule le solde de la caisse à partir de la ligne modifiée jusqu'au dernier élément de la colonne
car tous liés. La boucle for définit le début et la fin des modifications.
Je compte sur chacun pour la résolution de cette difficulté. Merci…
|
|
|
|
|
This is an English speaking site. Modify your question and replace your French text with English.
|
|
|
|
|
Google translate: Hello dear forum members, I have a concern that is related to updating my table.
Indeed I designed a vb.net application for the management of cash operations for the account
of a structure and everything works correctly until the level of the modification of the table where I have a problem.
The thing is that an operation is either a receipt or an expense from which I created a variable
balance = revenue - expenditure (revenue or expenditure is nil depending on the nature of the operation) which represents the balance
of each operation performed.
As for the part of the cash balance from an op2 operation, we have:
E: balance_caisse_op2 = balance_op2 + balance_caisse_op1 (equal to balance_op1) and it works well in insertion.
My problem is that on for example 10 operations carried out we decide to modify the 5th operation,
how to readjust cash register balance from changed row to last item in table
cash_balance, since the different lines are dependent for the calculation of the different balances
of the body according to equation E.
I have already thought of a solution but that gives me a FatalError. I actually did the following:
[CODE]
In summary, the GetMaxId() method when called returns the id_max of the operation table and this value will be used
stop condition in the loop.
Then the GetBalanceCaisse() method, for its part, calculates the balance of the cashbox during a given operation.
Finally, the UpdateBalance() method which will be called just after the one which will modify the line
concerned, we recalculate the balance of the cash register from the modified line to the last element of the column
because all related. The for loop defines the start and end of changes.
I am counting on everyone to resolve this difficulty. Thanks…
From your description, it sounds like you're trying to build some sort of running total. But looking at your code, it's not clear how you're doing that, nor what the problem is.
Start by describing your table structure and providing some sample data. Then explain what you're updating, and what you want to happen when you update it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Deshalb speichern wir keine laufende Summe; es ist die Summe aller Datensätze in der Datenbank zu diesem Zeitpunkt. Sie speichern es nie, Sie berechnen es. Es ist nicht so dass es Jahre dauern wird. Schauen Sie sich auch das Erinnerungsmuster (memento-pattern) an.
And no, if you don't speak English, why would I bother to translate?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
hello all
how build a dns server software by vb.net
|
|
|
|
|
Well, you start by reading the entirety of RFCs 1034[^] and 1035[^] and completely understand all of it before you start thinking of writing code.
Oh, and I hope you're well skilled in writing TCP servers, and creating your own database to store the record data.
|
|
|
|
|
Dave Kreskowiak wrote: eading the entirety of RFCs 1034[^] and 1035[^] and completely understand all of it In other words: Give up, and never more bother us with questions about it ...
|
|
|
|
|
No, I'm dead serious. You either understand the entire spec or you're writing a server that doesn't work with clients.
You have no idea how much work is going to go into this project. It's not something you're going to bang out in couple of weekends, and you're not going to get description of how to do it in a forum environment where that description would take a three volume set of books to write.
|
|
|
|
|
|
How would you answer the question then?
You think telling someone to read the "spec", when they obviously haven't, is "harsh"?
How can you share a vocabulary when only one part speaks the language?
I'm ecstatic when there is a spec and I don't have to rely on someone's say-so or interpretation.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
|
Do not answer questions if you are upset
|
|
|
|
|
What I am trying to do is insert a buttons name into part of a URL so that instead of C&P 300+ pieces of code for individual items that I can just use 1 piece of code for the many different Items.
This is what I am using currently
formname.txtURL.text = "www.webaddress.com.html"
What I want it to do is:
formname.txtURL.text = "www.webaddress.com/(buttonnamehere).html"
What I am missing the piece I need to add for (buttonnamehere) So when the button is clicked, it would make it
http://www.webaddress.com/buttonsnames.html
Is this something that's possible to do?
|
|
|
|
|
Try this:
Dim ButtonName As String
ButtonName = Button1.Text
formname.txtURL.text = "www.webaddress.com/" & ButtonName & ".html"
|
|
|
|
|
Okay, so that would work for just 1 how would it also work for the other buttons on a Click statement?
Would it be just a mess of "If" statements? If Button2 then, If Button3, Then, etc?
|
|
|
|
|
How about:
In the click handler, you have the sender argument, correct? Put code into the click handler that casts the sender argument to a button object and grabs its Text property. And set every button to use that one click handler.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I have a service that will perform some kind of action depending on what the SessionChangeDescription is. The service is installed on a computer that autologs in. To make this happen this registry value needs to be set and is set during OnStart:
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Value: AutoAdminLogon
Data: 1
There is a Windows Form that will allow a domain user to log in and the service will change the AutoAdminLogon value to a 0. When a power outage occurs and power is restored the PC, the computer does not autologon cause the registry value AutoAdminLogon is not set back to a 1 yet. I normally just send a logoff, tsdiscon, or restart to the computer through SCCM and it will autolog again. These are my questions:
1. Is it possible to logoff or disconnect a session through the service at a logon screen?
2. Is it possible to trigger one of the SessionChangeDescription without any session changes?
3. Restart the computer through the service?
What I have tried:
At OnStart, get the AutoAdminLogon value and if it a 0, then do one of these:
ExitWindowsEx function, WTSDisconnectSession function, wmi to logoff a session, tsdiscon.exe, logoff.exe, shutdown.exe, and LockWorkstation function.
None of them work. If I do the same through SCCM, the computer autologs in.
|
|
|
|
|
Nevermind. Looks like I guessed a bunch of times and was able to figure it out. Even though in SCCM, I only use tsdiscon and the account used is the SYSTEM account, it works. It doesn't apply in this scenario. Using tsdiscon 1 (Session 1) works or WTSDisconnectSession function with a 1 for Session 1 also works.
|
|
|
|
|
I am not using Visual Studio these days. I use C and C++, or at least I am trying to learn to use C and C++.
I remember putting over 1,000,000 entries into a listbox and then being able to read all of them back.
I also remember the listbox sorting that entire 1,000,000 entries correctly.
Who else has noticed this capacity?
And, as a follow up question: Does the latest version of Visual Studio have this capacity for it's listbox?
Thank you.
|
|
|
|