476 Posted Topics
Re: Add one single line of code just before you call the Update() method on the second dataset. [CODE] DataDataSet.Tables("Teams").Rows.Add(TeamInfo) ''' Add this line, this will commit any changes made to the dataset since it was loaded DataDataSet.AcceptChanges() ''' DataDataSet2.Update(DataDataSet, "Teams") [/CODE] | |
Re: A field in the SQL Select query with a datatype of Bit should give you a checkbox in the DataGridView. | |
Re: If the actual checking works. Then perhaps you should look into Threading instead of a Timer. | |
Re: Well, if you're not setting the value somewhere else, then the value of Me.pass is what you just set it to in your codesnippet. I have no idea as to why you have an ampersand in the first ToDouble method, especially considering that the ampersand is a string concatinator, which … | |
Re: The Left property is the horizontal position of the panel within it's parent container, there is no Right property. If you need to move the panel from left to right, then you have to change the value of Left. Panel122.Left = 0, means that the panel is at it's left-most … | |
Re: I suggest this project: [URL="http://www.codeproject.com/KB/audio-video/SoundClass.aspx"]http://www.codeproject.com/KB/audio-video/SoundClass.aspx[/URL]. You can always find an answer if you google it. | |
Re: On lines 224 and 361: Add [ICODE]DataGridView1.Update()[/ICODE] below them. ------------------------------ Please disregard my post. Totally wrong. :) | |
Re: If the customers full name is stored in one single string, then what you have is perfectly fine. However, you might wanna consider performing the check in all lower case. Like so: [CODE] Dim sqlQRY As String = "SELECT COUNT(*) AS numRows FROM CustomerInformation WHERE LOWER(CustomerName) = '" & TextBox1.Text.ToLower() … | |
Re: You probably marked this thread as solved by mistake. If that is so, then might I suggest a small change in the first snippet. On line 7, do the following change: [CODE] 'Your code .strWhere = "{PlotNo.Hiring} = """ & TextBox9.Text & """" 'Remove the soft brackets and change it … | |
Re: Why do you add 45 to GcoinPoints every time you click the button, regardless if you win or lose? This is three losing rounds: First round: GcoinPoints = 45 Second round GcoinPoints = 90 Third round GcoinPoints = 135 That could be the reason for problem 1, that the score … | |
Re: It is not possible to assign a method to a variable like that. But you can create a class that holds all those methods, where you tell the constructor which method to execute. Like this: [CODE] Public Class Methods Private strMethodName As String Private objVar1 As Object Private objVar2 As … | |
Re: What happens if you reset the protection after you update the Excel sheet? By looking at your code it seems like you fÃrst unlock the sheet, read from the MySql database and then lock the sheet again, without updating the sheet. When do you do your update? | |
Re: Ok. Three questions. What does button1 open? How far have you come yourself? Have you tried searching for the solution, either here or on Google? | |
Re: Unfortunately, using heavy graphics and in such sizes tends to slow things down a bit. I have a friend who did the same thing in her application. And it was sluggish even on my, high-end, computer. For the large, I'm assuming, background image I recommend that you pick a solid … | |
Re: Yes. You do that in the connection string. Assuming that you're using an Access database, then the connection string might look something like this. Notice the [b]Data Source[/b] path. [CODE] Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\mydatabase.mdb;User Id=admin;Password=;") [/CODE] | |
Re: No, that is correct even in VB.NET. That being said, if the object contains a Dispose method, then you should do myObj.Dispose() before assigning it to Nothing. | |
Re: You should examine the keyword [b]BETWEEN[/b] for SQL queries. [b]SELECT * FROM table WHERE Timing BETWEEN '#23/07/2010#' AND '#02/08/2010#'[/b] And if you are using the JET driver when connecting to your Access database, you can try formatting the date as YYYY-MM-DD inside the query in order to avoid confusion. You … | |
Re: Are there any errors being thrown? A while ago I was facing a similar situation, but in reverse. I added a feature for a web-portal where users could upload files to the server, and those files needed to be moved to a fileserver located behind two firewalls and the DMZ. … | |
Re: This question should have been posted in the ASP.NET forum. But to answer your question. Add a module to your project by right-clicking your project and select Add->Module. Put your function in there and make it Public instead of Private. Voila! Now you can use your code from everywhere. | |
Re: Your code would work perfectly if you manually populated the DataGridView. But because the grid is databound, any changes to the grid layout, ie a new column, will result in an error because that column is not part of the original database table. The error occurs because the change in … | |
Re: Well, belle. What would you like to know more precisely? There are a lot of things you can do with the ListView control. The ListView control is simply to, well, list things from top to bottom. If you put a ListView control on a form, you can do this in … | |
Re: Add a regular button to your form. Then set the property FlatStyle to Flat, go to BackgroundImage and select the image you created and finally set the property BackgroundImageLayout to Stretch. That will make it look like you have created your own button. Just make sure that the background color … | |
Re: I believe the answer to your original question, a dynamically visible column, lies in the property Visible for the Columns collection. [CODE] If DataGridView1.Rows(243).Cells(2).Value.Equals("some value") Then DataGridView1.Columns(5).Visible = False End If [/CODE] | |
Re: You should defintitaly read [URL="http://msdn.microsoft.com/en-us/library/ms229605(VS.80).aspx"]this article[/URL]. It addresses exactly what you are looking for. | |
Re: This might be helpful: [URL="http://www.codeproject.com/KB/cpp/rimage.aspx"]http://www.codeproject.com/KB/cpp/rimage.aspx[/URL] | |
Re: Perhaps one of these projects can be useful. [URL="http://www.codeproject.com/KB/printing/"]http://www.codeproject.com/KB/printing/[/URL] | |
Re: This is what you need, it's a multi-column combobox. [URL="http://www.vbaccelerator.com/home/net/code/controls/ListBox_and_ComboBox/Icon_ComboBox/article.asp"]http://www.vbaccelerator.com/home/net/code/controls/ListBox_and_ComboBox/Icon_ComboBox/article.asp[/URL] And for your problem with unselecting a selected item, use [ICODE]combobox1.SelectedIndex = -1[/ICODE]. | |
Re: Depending on what error message you get, my first guess is that you're not using dedicated login credentials for the SQL server. What I mean is, you are probably using Windows Authentication instead of a specific username and password, and that your client system does not have access to the … | |
Re: After each da.Update you should add a ds.AcceptChanges. This commits all changes made to the dataset since the last time a change was made. | |
Re: Well, first of all you'll need the Mysql Connector/NET. You will find it [URL="http://dev.mysql.com/downloads/connector/net/"]here[/URL]. Second, everything you've read so far about connecting to an MS SQL server, either here or elsewhere, you can apply when dealing with MySQL. All you have to do is replace any reference to SqlConnection, SqlCommand … | |
Re: You can try this. Put a button of your form and call it btnImport. Then add this code. [CODE] Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click Dim fileName As String = "" Dim ofd As New OpenFileDialog If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then fileName = ofd.FileName … | |
Re: Replace your codesnippet with this: [CODE] PageSetupDialog1.Document = PrintDocument1 If PageSetupDialog1.ShowDialog = DialogResult.OK Then PrintForm1.PrinterSettings.DefaultPageSettings.Margins = PageSetupDialog1.PageSettings.Margins PrintForm1.Print() End If [/CODE] | |
Re: According to [URL="http://www.ddms.com/Resources/Support/faq/hardware/BarCodes.pdf"]this paper[/URL], a printer (of any kind) does not automatically support printing of barcodes by the use of a font. It seems like it would be less of a hazzle to go the bitmap way, and print an image instead of a text. | |
Re: Assuming that your text is in a RichTextBox control. Try this: [CODE] Public Class Form1 Private WithEvents prn As Printing.PrintDocument Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Form1.Load End Sub Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click prn.Print() End Sub Private … | |
Re: You could have a look at [URL="http://www.codeproject.com/KB/directx/CapSample1.aspx"]this[/URL] project. It uses DirectX for video capture and saving. | |
Re: At what time does this error occur, and what does the code look like where the error occurs? Have you set this second form as the startup form from within the project properties? | |
Re: There is no easy way to achieve this. But the newest version of this third-party component has functionality for it. [URL="http://www.ocrtools.com/fi/Default.aspx"]http://www.ocrtools.com/fi/Default.aspx[/URL] | |
Re: Although this should have been posted in the ASP.NET forum. Here's the solution: [CODE] Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Me.IsPostBack = False Then chklst.Items.Add("Gold") chklst.Items.Add("Red") chklst.Items.Add("Blue") chklst.Items.Add("Yellow") chklst.Items.Add("Black") chklst.Items.Add("Orange") End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As … | |
Re: What happens during debugging? Does the code step into the For...Next iteration? What's the size of [b]linesPerPage[/b] and [b]yPosition[/b]? Does the code reach the line [ICODE]e.Graphics.DrawString(...)[/ICODE]? | |
Re: Have you tried to google it? Keywords: developer certification But to get you started on your quest: [URL="http://certification.about.com/cs/beginner/a/progcerts.htm"]http://certification.about.com/cs/beginner/a/progcerts.htm[/URL] | |
Re: Here is a way to get you started: [URL="http://www.codeguru.com/vb/vb_internet/html/article.php/c4815"]http://www.codeguru.com/vb/vb_internet/html/article.php/c4815[/URL] | |
Re: There is no direct access to disable column sorting in the datagridview. But you can try this: [CODE] For Each dgvCol As DataGridViewColumn In Me.DataGridView1.Columns dgvCol.SortMode = DataGridViewColumnSortMode.NotSortable Next [/CODE] | |
Re: Yes, there is. This is a quick sample of how to accomplish that. This is the button click. [CODE] Private Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click Dim login As LoginReturnCodes Dim lif As New LoginForm() If lif.ShowDialog() = DialogResult.OK Then login = lif.Success End If … | |
Re: Well. You have the MouseEnter, MouseLeave and Click events. And you also have the Width and Height properties. | |
Re: And he answered your question. By using the OpenFileDialog, you can browse the network to the other computer, select the file and open it. Network or Local, it makes no difference. Or, if you know the path and the file you want to read is the same, over and over … | |
Re: Here how to retrieve data: [CODE] Private Sub GetData(ID As Integer) Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;") Dim com As OleDbCommand = Nothing Dim dr As OleDbDataReader = Nothing Try con.Open() com = New OleDbCommand("SELECT * FROM table WHERE id = " & ID, con) dr = com.ExecuteReader(CommandBehavior.CloseConnection) If … | |
Re: Looks good. Very interesting indeed. A couple of questions though. How compatible is it with all the HTML, CSS and javascript standards out there? And for those of us who like to use keyboard shortcuts, for browsing pages, instead of using the mouse, how are you implementing those? | |
Re: I'm assuming that you have a DataGridView on your form, named DataGridView1. [CODE] Dim cn As New OledbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Wise-fps01\shared\vbDataBase.mdb") cn.Open() Dim adapter As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM marketingDB WHERE company_name = 'Opfer Logan'", cn) Dim table As New DataTable() adapter.Fill(table) cn.Close() DataGridView1.DataSource = table DataGridView.Update() [/CODE] | |
Re: You are probably getting an error because you are missing the field names in the INSERT query. Try this: [CODE] Dim con As New SqlClient.SqlConnection("Server=iraq\SQLEXPRESS; Database=stats; Trusted_Connection=True;") Dim com As New SqlClient.SqlCommand("insert into users (field1,field2,field3) values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "')", con) Try … |
The End.