lolafuertes 145 Master Poster
Mr.BunyRabit commented: Gave the code, and it worked +1
gr8fasushi commented: very helpful, thank you! +1
And the problem is ...
Please, can you clarify what do you mean with 'repeated records'?
a) Allways show the same records at every refresh of the datagrid
b) All the rows shown have the same values
c) At every refresh, the data grid increases the number of rows, and the content of the new rows is exactly the same of the old rows
Thanks to clarify
If you use a dataset, the data adapter will fill it with the data according to the select.
If the select references a query in the server, the server executes the query and returns the result to the datase.
Instead, if you fill the dataset with all the data from the table, and then apply a view to filter the data, you are wasting memory and bandwith.
Lets do some examples. Imagine you have a nice table of 16GB of data with an structure of a recordId, recordDate, recordAmount and recordQuantity. Then you need to retireve only the rows having the highest quantity (a priori you don't know wich one is/are)
If you fill a datatable with 16Gb of data ... well you know what will happen to your application.
Instead, you can fill the table using 2 techniques to obtain the desired result:
+ Create a query in the server that always returns the rows having the highest quantity [SELECT * FROM MyLargeTable WHERE recordQuantity = MAX(recordQauntity)] and use a SELECT * FROM MyServerQuery for the dataadapter to fill your datatable or
+ Create an adhoc query like SELECT * FROM MyLargeTable WHERE recordQuantity = MAX(recordQauntity) for the data adapter.
While the first solution is partially known by the server, already compiled, permissions tested and the execution plan is loaded the first time you execute it when you send the adhoc query for SELECT * FROm MyServerQuery, the second one will …
I try to isolate the data manipulation fom the application layer, so I write all the queries in SQL.
Also I mainly use stored procedures for Insert, Update and Delete. This is specially useful when doing complex (multi table related) inserts, updates and deletes thinking in terms of transaction isolation.
Hope his helps
I can only see that the problem will be on the _objState. Is the ed.getStates returnin duplicates?
Hope this helps
After BringToFront you need to set the Focus on that form.
Hope this helps
Yes, you can:
MydataGridView = null;
MyDataGridView = new DataGridView();
Hope this helps
Just guessing if an OTXTrackRecord in C# has the same signature than a TrackRecord in C++
Nope. I currently have no Lotus Note installed to test. Sorry.
Maybe, if you put your code and te reference of dlls used in the project, we (the community) can help you to search for a solution.
BR
This is because the transaction for cmdID1 and cmdID2 has not been set.
I'll suggest that as you assign the transaction to the sqlcmd in line 3 of this example, you should add in line 4:
cmdID1.Transaction = trans
cmdID2.Transaction = trans
Hope this helps
you are welcome
Use the GetObject instead of CreateObject.
If a sessions exists, this will attach to the session, else will create a new session.
Hope this helps.
The FK population from issues to issuesdesc is not automatic, even you define a relation. This info is on ly used in to select info, update existing info or delete related records, but, unfortunatelly, not for insert.
In order to solve your problem you need, first to do the insert for the issues table. Then retrieve from this table the highest index and use it to populate the record to be inserted into the issue desc table. And do all three actions inside a unique transaction, to ensure that no other user, concurrent insert in the issues table, harms your transaction.
Hope this helps
Did you tryed to change the search path inthe destination machine to point also to the directory where those dll are placed? (CMD -> SET)
Did you tryed to set the installer to register the DLLs in the GAC?
Hope this helps
Tx for the feedback. Please be so kind to mark this thread as solved.
Please, let us know if this solved your problem or found a better solution.
Thanks in advance
Navigate to the base registry key HKEY_LOCAL_MACHINE and subkey SOFTWARE/Classes using the Sysytem.Windows.Forms.Application.CommonAppDataregistry (OpenBaseKey/OpenSubkey) or the Microsoft.Win32.Registry.Localmachine OpenSubKey.
For each existing version you will find a subkey like Access.Application.x (where x means the version number: 12 => 2007)
If the version was installed, you should find a subkey like /shell/open/command having a default value pointing to the executable path for the version.
Hope this helps
If the resource file is in the executing folder, you can set the basename to the name of the resource file (without the extension) and use the EntryAssemly intead of the Executing one.
Hothe this helps.
That is fine.
Just I am guessing that when you reference the functions in the query, you do not specify that they came from a form(Ie: MyForm.GetCustomer()).
If I remember well, the form functions are not in memory if the form is not opened, so are not allways accessible.
To avoid this situation, the 'best' solution is to place these functions in a new Module ( not form depending) and always being defined as public. Also, you'll need to move all the private fields referenced by them to public fields in the module. My suggestion is to pass all the set and al the get functions.
Then you best change the where clause to be like
(IIF(IssNull(GetCustomer()), True, (tblRMA.Customer)=GetCustomer()) AND IIF(IsNull(Getmanufacturer(), True, (tblModel.Manufacturer)=GetManufacturer()) AND ((tblModel.Type)=GetType()))
This way, in case of null answers will not filter by this column (least bad option).
Hope this helps.
Change lines 15 and 41 to
dataGridView1 = new DataGridView();
Hope this helps
Can you be so kind to put here the SQL text of your query?
Try the BGInfo utility from MS (http://technet.microsoft.com/en-us/sysinternals/bb897557)
Yu can launch it from VB (i.e. Shell("BGInfo.exe")). See the possible parameters and configurations to obtain the right result.
Hope this helps
The question here is that every time you launch the button click event, you fire a loop, always ending at 5.
Istead you can
1) declare the counter outside the button click procedure
2) monitor their value to start at 1 showing the button when the forms Load, and hidding the button when his value is greater than 5 after incrementing it in the button click procedure.
3)Finally, remove the For and the Next sentences.
Hope this helps.
There are almost two ways to get what you want:
1) Do a SELECT * against the table to update (using a 'WHERE 1=2' select clause in order to fill the table with no records) to obtain all the existing fileds, and use it in a data adapter to fill a dataset table. The fields collection of the datatable will give you the names of existing fileds, so you can dinamicaly create the alter sentence adding only those not existing in the table.
2) Split the sentence to be one for each field. Execute one by one and ignore the errors.
Hope this helps
Normally, when an excel file is open, a file starting with ~$ and the name of he workbook exists on the same directory where the workbook exists. You can easely chek if thei file exists with a
Dim MyFile as new System.IO.FileInfo("~$Book1.xslm")
If MyFile.Exists Then
'
' Close it here
'
End If
Hope this helps
The approah to find the running processes is good to know if there is an excel instance running. Else every thing is OK.
I there is one (or more) running instance(s), The VisualBasic namespace offers the getobject method to get an instance of the running program. No matter wich one.
Once acquired, you should forcibily close any open workbook, without saving the data. (this will help the user to learn to save their work before leaving the desk)
You must then close the Excel object, and release it, and wait for a few( 5 to 10) seconds to allow the procesor to end the application, and redo the entire process until excel has no running instance(s).
Another approach maybe using old DDE techniques (MSDN search DDE and Visual Basic)
Hope this helps.
Please, can you be so kind to post the resulting commands?
On Access you must define the fields as Yes/No
Then
dsnewrow.Item("Urgent") = checkBoxUrgent.Checked
dsnewrow.Item("Option1") = radioButton1.Checked
Hope this helps
Just some hints:
If you want one additional column then change to
Dim str(qtyCols) As String
Then, before creating the ListViewitem, add the calculation.
str(qtyCols) = (Microsoft.VisualBasic.Val(str(qtyCols-2))/Microsoft.VisualBasic.Val(str(qtyCols-1)) * 100).ToString
or whatelse calculation you need
Hope this helps.
Please, verify the line 18 of your code.
Maybe you need to change to
da.DeleteCommand = myBuilder.GetDeleteCommand
Hope this helps
Maybe on line 12 of your example you can add:
Dim Parts() As String = Lines(0).Split("="c)
then show the Parts(1)
or change the line 14 to
Me.TextBox1.Text=Lines(0).SubString(Lines(0).IndexOf("="c) + 1)
The first solution can fail if no '=' sign exists.
The second solution will show all the line content is no '=' sign exists.
Hope this helps
Thanks for the reply.
Maybe you can be so kind to show use final design, and mark this thread as solved.
Just some comments.
Your Billing and Findings Tables must have a field with ConsultNo to link with the Consultation table. Change the relation according.
Probably you need to connect Medication to the Doctor and to the Pharmacy so you'll need the fileds for DoctorId and PharId in the Medications table and change the relations according.
On the Appointment table you'll refer also to the Nurse and to the Patient related to this appointment, so add the NurseId and PatId fileds to the appointment table and change the relations.
Probably you will add a relation between Lab_results and MedTech. Also you will need tohave the result values, and alslo the reference min/max values and the unit of mesure for the Lab_Results.
On the confinement table maybe you will know the patient, adding the PatId and setting the corresponding relation between Patient and Confinement.
Abut the OutPatient relation to the Patient defined 1 to 1 means that you never can creat a new patient, because you need an existing outpatient with the same ID, but you alse never can create an outpatiente because you need an existimg patient with the same Id. to solve this, you can add a OutPatient flag in the Patient table and forgot about the OutPatient table.
Hope this helps
This is because the focus still on the button.
On the button click event, you can set the focus to another control to 'remove' the rectangle
Hope this helps.
When you do any action agtainst a database, the DBMS uses to 'mark' the database being used by you. Also 'marks' the tables, and also each record you access, to be sure that, if any other user want to access to the same info, can access (or not) depending on the actions pending.
This process is called Locking. Locking is done writing in a special table the info of what is being locked.
By default, locking is done at 'page' level. Depending on the size of the each record in the table, many can be locked. If a page is locked for shared read, it can't be modified until the lock is released. If is locked for update (insert, update or delete) can't be read until the write operation is finished.
The duration of the locking depends on how much time your connection / sqlcommand needs to finish the work and to release the objects locked. Then the DBMS needs to free the locks in the DB. This also consumes resources.
Hope this helps
In order to quicly free resources, I would prefer to fill some table in a memory dataset, then close and dispose the connection to the server (freeing resources). after that you can cicle over the data in memory.
Between fills, give some time to the system calling the System.Threading.Thread.Sleep for 50 miliseconds.
Hope this helps.
ADO is part of the Visual Studio runtime and you don't need to buy it separately
Hope this helps
Of Course you can load it using some thing like:
For RowNum as Integer = 0 to ds.Tables(0).Rows.Count -1
Dim CurrRow as DataRow = ds.Tables(0).Rows(RowNum)
'
' Assuming the data Grid View has enough rows
'
DataGridView1.Rows(RowNum).Cells("column1").Value = Currrow("column1").Value
DataGridView1.Rows(RowNum).Cells("column11").Value = Currrow("column11").Value
. etc
Next
Hope this helps
The MSDN_AA license terms on http://msdn.microsoft.com/en-us/academic/bb250622.aspx are explicit:
[PartQuote]You may use the software for non-commercial purposes including instructional use, research and/or design, and development and testing of projects for class assignments, tests, or personal projects. You may not use MSDNAA software for any for-profit software development.[/PartQuote]
So the answer to your question is yes, you 'must' buy it in order to sell your application.
Hope this helps
Maybe you can use some Virtualization using VMware or any other, and install a Virtual copy of the OS having a virtually higher resolution. I am not really sure if your laptop, and your card/monitor, will support that.
If I remember well, Microsoft requires at least a resolution of 800*600 to run their OS (exept in safe mode that runs at 640*480) so from a 'technical' point of view your laptop is OK.
I always recommend to have higher resolution screens.
Hope this helps
Maybe you can extent your array to place the Integer.MaxValue as the last element in the intPoint array and an extra element int the strgrades for those values.
Hope this helps
I suggest to change your loop a little bit to find when the suplied value is less than the upper limit of the segment:
Do Until intSubScript = intPoints.Length _
OrElse intSearchForPoints < intPoints(intSubScript)
intSubScript = intSubScript + 1
Loop
Then to obtain the 'previous' grade
If intSubScript <= intPoints.Length Then
lblGrade.Text = strGrades(intSubScript - 1 ).ToString
Hope this helps
Usually to create the code you are trying to sell you used Visula studio /Visual Basic to develop it.
Do you own a demo/free version of Visual Strudio/Visual Basic or you brought it somewhere?
Or just put the image in the .Image property of the button and clean the .text.
Resize the button to the image size.
Hope this helps
Just wondering if you cann add an external monitor with higer resolution
In this case, you need:
1) to save the file in a temporary file,
2) set the image to nothing so will release the source file,
3) wait for some miliseconds to give time to the OS to release the handler,
4) then delete the old file and
5) rename the temp to the right name.
Hope this helps
This event is fired 'only' when the contents of a cell need to be formatted for display. If not, the is not fired.
see on http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx the conditions under is fired.
Maybe you need to reformat your code to set the cell style backcolor just after filling the datagridview.
Hope this helps