638 Posted Topics
Re: The FROM Clause is merging each BaseStation with all the possible Response_Team_On_shift records, then the result if filtered according to the WHERE clause. Hope this is the behaviour expected. To eliminate the duplicates you can modify the SELECT clause adding the DISTINCT restriction like: sqlCmd.CommandText = "SELECT DISTINCT BaseStationCode, BaseStationName, … | |
Re: For the example I'll assume that Form2 is created using Dim Form2 as New frmMyForm being frmMyForm the class for the form being used Then I will suggest to change the definition of sub Main as: [CODE]Sub Main(ByRef FormToUpdate as frmMyFomr)[/CODE] Then inside the sub Main you can [CODE]FormToUpdate.Label2.Text = … | |
Re: I prefer to write: [CODE] myCommand = New OleDbCommand("insert into payment (slip) VALUES (" & wa.tostring & ") ", con) 'insert the value of "wa"[/CODE] Hope this helps | |
Re: Try to add a DataGridView1.Refresh() after setting the datasource. Aassuming that the table "AddressBook" has some rows, this will ensure that the contents of the data grid view is fully reloaded an repainted. Hope this helps | |
Re: The + sign is actually representing the sum. Cheese can be converted to a number while "youranswer is" can not. Because InputBox returns always an string (that maybe empty) I would try some thing like [CODE]Dim Pizza As String Dim Taco As String Dim Cheese As String Dim Cat As … | |
Re: Pre-requisites: Have the MySql Conector installed and referenced in your project. Have a MySql database (MyBase) with a table (MyTable) having an Id integer field to reference the record and a FullPath string to hold the full absolute path to the image file. Assumptions: You already know the image Id … | |
Re: Normally quantity, price and cost are numeric, so you do not need to surround the values wit single cuootes. IE: dsql = dsql & "Price = " & PriceText.Text & " AND Cost = " & CostText.Text & " AND " Hope this helps | |
Re: I'll assume that codimporter is of type integer. If this is true, then [CODE]Dim cmdimp As New OleDb.OleDbCommand("select * from importer where cod_importer = " & codimporter.ToString & ";", conn) [/CODE] Else [CODE] Dim intCodeImporter as Integer = -1 Try intCodeImporter = Ctype(codimporter, Integer) Catch ex as Exception msgbox "This … | |
Re: Also you can navigate to [url]http://www.microsoft.com/learning/en/us/training/products.aspx[/url] | |
Re: For the second, the problem is related on how a date is mantained internally and the way is parsed. For a date of 04/03/2010 is this March 4th or April 3rd? Instead of Now() use [CODE]Format(Now(),"yyyy-MM-dd")[/CODE]This will present allways your date in the 'universal' format expected to be 2010-03-04 (March … | |
Re: This means that a SQL Command was executed outside of a try catch structure and got an error. | |
Re: This can happen for many reasons. The most commons are: * the creation of objects that never are disposed. IE: Inside a never ending loop, SomeThing = new WhatItWas * Infinite recursivity * Lots of pending transactions in memory, big tables or collections, etc. If you post your code, we … | |
Re: You are using relative paths to gzip.exe and, depending on the starting folder of you application, this call can fail. Try to set the full path to gzip.exe . Also be sure that the path Dest & "\Backup\" already exists. Hope this helps. | |
Re: Jus guessing if the problem is in the task bar properties to hide the inactive icons. Had you already tried to set it not to hide them? | |
Re: Try to not include the flash dlls into the distributable and set them as a requirement. When you install a fresh version of flash, the GAC is updated overriding your setting. Verify if the VS has automatically created a wrapper for those dlls and include it in your project. Hope … | |
Re: Hopefully you may want not a windows program running, waiting for a timer during one month. The best way is to isolate this functionalty in a separate console application and use the task scheduler of Windows to planify when, and under wich user, must be executed. Be aware that this … | |
Re: In your first try you have some problems: 1) Each time you call the getDBConn() you obtain a New Connection, but... because is exactly the same as any previous call, the connection poll will try tu use the same. 2) When you issue the 'If setUsersOnline(username) = True Then' sentence, … | |
Re: On the MySqlDataAdapter you only defined the SELECT command. You need to fill in the Insert, Delete and Update commands of the data adapter. Then on your code 2, after myTable.AcceptChanges() youmust add [CODE]Msadptr.Update[/CODE] Hope this helps | |
Re: Just a few comments. Be sure to dr.close each data reader before closing the connection to the MySql database. On the INSERT commnad I will change it to sime thing like:[CODE] strSQL = "INSERT INTO dbo.RetailerBalance([BoothID],[TransactionDateTime],[TransactionDate], [GrandTotal],) VALUES ('" & BoothID & "','" & Format(CurrentTranxDate,"yyyy-MM-dd") & "', " & (GrandTotal … | |
Re: On the ds you neew to add a new table [CODE]ds.Tables.Add("MyNewTable")[/CODE] Then on ds.Tables("MyNewtable"), you need to add 5 columns [CODE]ds.Tables("MyNewtable").Columns.Add("Col1") ds.Tables("MyNewtable").Columns.Add("Col2") ds.Tables("MyNewtable").Columns.Add("Col3") ds.Tables("MyNewtable").Columns.Add("Col4") ds.Tables("MyNewtable").Columns.Add("Col5")[/CODE] Then, you need to create a row to be added to the table[CODE]Dim MyNewRow As DataRow = ds.Tables("MyNewtable").NewRow [/CODE] Here you must assign the values … | |
Re: The starting object is a form? If so, put breaks inside the Initialize Components and in the very first sentence on the form Load and Activate events to step through. the starting object is a Sub Put all the code of the sub inside a try /catch block. When the … | |
Re: You can cicle by the datagrid rows. On each row, compare if the left part of the first column text contents the search string in hte textbox. If found, then select the current row and exit. [CODE]For Row As Integer = 0 To Dgview.Rows.Count If Dgview.Rows(Row).Cells(0).Value.ToString.Substring(0, textbox1.Text.Length) = textbox1.Text Then … | |
Re: In order to use the data base in the server, you should install the SQL Server server part in the server. Then change the connection string from local to the server. You need another project, a Setup one, in order to properly publish your application. If you use the wizard, … | |
Re: [QUOTE]may i know how to add 4 new column to existing table("customer") automatic after split the string?[/QUOTE] Assuming that the text top split is in a string called TextTosplit, and the split charcter is the "-", you can separate then into a string array using some thing like [CODE]Dim StringParts … | |
Re: When you declare the data adapter, you only fill in the SELECT Command. In order the data adapter can modify the data base contents, you need also to define the Insert, Delete and Update commands for the da on FormElectricalWorkshopCertNew_Load, before isuuing the da.Update(dt) in butCont2_Click. Hope this helps | |
Re: Add a sub like [CODE] Sub ApplyCulture(Byval SelectedCulturename as String) Dim Rm As New Resources.ResourceManager("YourProject.YourFormClass", System.Reflection.Assembly.GetExecutingAssembly()) Dim Ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(SelectedCultureName) Me.Text = Rm.GetString("$this.Text", Ci) . . ' you need to do this for all controls having a distinct text depending on the language . Me.btnWhatItWas.Text = Rm.GetString("btnWhatItWas.Text", … | |
Re: In your MS Access database, if you do not have already defined the relations between the tables, do it using the data base tools. The Patient should be the "Parent" table and NOK and Admission should be "Children" When defining the relations, see on the bottom a check box to … | |
Re: In the form where you pull the data from Table1, change the select string to 'join' both tables using the integer identifying the phase on each one like "SELECT [Table1].[CurrentPhaseInt], [Table2].[Description] FROM [Table1] INNER JOIN [Table2] ON [Table1].[CurrentPhaseInt] = [Table2].[PhaseIdInt] " Hope this helps | |
Re: it is enough to change[CODE]objExcel.[COLOR="red"]ActiveSheet[/COLOR].Cells(row, column).Value = "cell data"[/CODE] | |
Re: Did you 'create' drives in other OS versions? How? What kind of message you need to send to local host? The administrator account is disabled for severe security reasons. The system asks you permissions every time this account is required so basically you don't need to use it. Any way, … | |
Re: @P0IT10n: The And logical operator evaluates all the compares, then 'Ands' the results. If only one of them is False, then the And operator returns false. The AndAlso operator evaluates the first. If the result is true, then compares the second and so on. This way, the very first false, … | |
Re: From my knowledge there is no direct support for Hijri dates inside ACCESS. The best way is to save them into text form of CCYY-MM-DD. You must write yur own functions in ACCESS to manage such dates as all the 12 months are 28 days each. | |
Re: Your SELECT, as is written, is called a cross join. This will mean that all the rows of facilitada are merged to each row in customer data, then the resulting set is merged to each row in employee data. If you have 3 rows in the first table, 2 on … | |
Re: In Visual Studio create a new console project. Inside the presented source code, between the lines Sub Main and End Sub, write [CODE] Console.WriteLine ("Hello world. Try to press a key") Console.ReadKey [/CODE] Compile and execute. You can guess the result. Hope this helps | |
Re: On your setup project, if you click with the alternate buttonon it, then a View /file System menu can be selected. On this view, verify the 'Application Folder' DefaultLocation property to verify on wich folder is installed your program. If you really need to add a specific folder, on the … | |
Re: You need to download the Power Packs for Visual Basic and install them. Then you sould fint the printform component to add to your form. [url]http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx[/url] Hope this helps | |
Re: Hopefully you have a Main (parent) form, where to place the tool strip, that you already set the IsMdiContainer property to True. When you launch the additional forms from this one, you set the MdiParent property of the children form pointing to the Main form. [CODE]Dim F as new frmChildForm1 … | |
Re: The rtf box has two properties related: .Text Is the text 'without' formatting .Rtf is the same text 'with' formatting (the stuff you do not need). When you save the file, you sould save the .rtf contents and, when loading, load the .rtf instead of the .text. Hope this helps | |
Re: I do not know any function to split by size, but you can implement your own thing like: [CODE]' Define the string to be split by length Dim MyString As String = "Hello man! Wazzup?" ' Call your defined split string by size function Dim MyGroups() As String = SplitStringBySize(MyString, … | |
Re: Cicle over the items and determine wich one is to be removed from the list. Just as a hint, if you cicle from last to first, removing the item will not affect to the loop. [CODE] Dim ValueToSearchFor as String = "XYZ" For I as Integer = ListBox1.Items.count - 1 … | |
Re: On your application, create a dataset showing the underlying database. Fill it in using the data adapters. Show the data binding the datagrid to the tables in your dataset When inserting, updating or deleting, do it against the tables in the dataset, then refresh the datagrid. Once the users clicks … | |
Re: Chang your line 10 of code to[CODE]oBook = oExcel.Workbooks.Open("C:\DailyLogs\DailyLog.xlsx")[/CODE] Hope this helps | |
Re: As the browser is an object, you may pass it by reference in the Set procedure [CODE]Set(ByRef value As browser)[/CODE] Also, before calling the Navigate method on your class, be sure you set the currrentbrowser property to an already instantiated one. As on the browser the Navigate method is not … | |
Re: On the Setup Project, Select the ApplicationFolder Add a new folder called docs. Select the folder docs. Add Files to this folder. On the Files dialog, you can select multiple files. Bild the application setup, and you can burn you CD. The documents always will be into the docs folder … | |
Re: The user 'must', press some kind of button or menu option when wants to add new data. Then to insert new data, you can add a blank row in the datagrid. | |
Re: If Me.cboTicketType.SelectedIndex = 1 Then . . . Else If Me.cboTicketType.SelectedIndex = 1 Then [COLOR="Red"] . It is impossible to get into this [/COLOR] End If End If | |
Re: Guessing if you already tryed to suspend the picturebox layout (SuspendLayout method) while drawing and resume the layout (ResumeLayout method) when you are ready to paint. Not sure if this helps. | |
Re: Using single quotes arround the content of the textbox1.text implies htat MySql should treat it as a text. Without the single quotes will assume that it is a number so it will try to put the value into the destination field. In your example, "€ 22,07" is not a number … | |
Re: If you are using ACCESS, then you can change a little bit the SQL sentence as: [CODE]SELECT EXAMEN.Int_Exa, IIF(ISNULL(T.nbrTest), 0, T.nbrTest) AS nbrTest FROM EXAMEN LEFT JOIN (SELECT int_Exa, COUNT(*) as nbrTest FROM TEST GROUP BY int_Exa) AS T ON EXAMEN.Int_Exa = T.Int_Exa ORDER BY EXAMEN.Int_ExaSELECT EXAMEN.Int_Exa, ISNULL(T.nbrTest, 0) AS … | |
Re: Any class can have a contructor. The constructor is a [CODE]Sub New() ... End Sub[/CODE] You can define wich kind of parameters you need to create the new instance of the class like[CODE] Sub New( Byval Parm1 As String, Byval Parm2 as Integer ) [/CODE] You can define as many … |
The End.