- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
51 Posted Topics
Re: [QUOTE=StatiX;456413]Im trying to display data in a datagrid then once a row is selected show a different column of the database in a text box. I use the unique primary key in the datagridview as not visible so once the row is selected, i can get that integer and populate … | |
Re: [QUOTE=datajaya_ap;865255]hello there, anyone can help... is this possible? i have a string value of form names in my DB so when my condition passes, the variable string will take over the value , then that value will call the form(variable) as string. i got an error when i use this … | |
Re: it can also be done this way [CODE] Dim col0 As New DataGridViewTextBoxColumn col0.DataPropertyName = "your data field here" col0.HeaderText = "your Header Text here" col0.Width = 75 col0.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter DataGridView1.Columns.Add(col0)[/CODE] | |
Re: You can use this sample. Export from DataGridView to Excel [CODE]Imports Excel = Microsoft.Office.Interop.Excel Dim excel As Excel.Application Dim xWorkBook As Excel.Workbook Dim xWorkSheet As Excel.Worksheet Dim misValue As Object = System.Reflection.Missing.Value Dim row As Integer Dim col As Integer excel = New Excel.ApplicationClass xWorkBook = excel.Workbooks.Add(misValue) xWorkSheet = xWorkBook.Worksheets.Add … | |
Hello, I have a newly created ASPX Website with Default.aspx and a Masterpage. on the master page i created a navigation menu i.e Home, News ect. then i created a folder inside the site and put some pages i.e page1.aspx. My problem is when im at page1.aspx (/mysite/folder1/page1.aspx) then hit … | |
Re: [QUOTE=Trekker182;829023]I found this connection string format to use to connect: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Shawn Minisall\Desktop\Homework 6\SongNames.accdb; but I get the format initialization string error message.[/QUOTE] The string connection above is not applicable for MS Access 2007 DB. You can use this one: "Provider ="Microsoft.Ace.OLEDB.12.0;Data Source=c:\database\mydatabase.accdb;Persist Security Info=False" | |
Hi everybody please help me on how to code this in C#. I have an ASP.Net Web project and needs some C# code behind. Working some variables: In my VB.Net it looks like this: [CODE] Dim str1 as String Private Sub Button1_Click(...) str1 = "some text" 'This will be assigned … | |
Re: I will show you another arrangement of coding which is pretty simple to read and understand First Create a Module where you store your Connection to your Database Module: [code] Option Explicit On Imports System Imports System.Data Imports System.Data.OLEDB Module DBCONN 'DBCONN is the name of your module Public conn … | |
Re: If you only allow numbers to be entered into your textbox Try this: [CODE]Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress If e.KeyChar=Chr(Keys.Enter) Then If Not IsNumeric(Textbox2.Text) Then MsgBox ("Invalid Number Format") Me.Textbox2.Focus Me.Textbox2.SelectAll Exit Sub Else 'do something here End If End If End Sub[/CODE] … | |
Re: first of all what .net framework you are using? | |
Re: I guess the INSERT syntax would look like this: "INSERT INTO Table_Name(Field1, Field2, Field3) VALUES ('" & Text1.Text &"','"& Text2.Text &"','" & Text3.Text &"')" | |
Re: [QUOTE=Cliffs0fdover;872621]Ok, I am pretty new to Visual Basic 2005. I am taking a course in it and we are creating a Department Store program right now. I pretty much have 90% of the program done, its just that when I try and move information as strings (name, province, postal code, … | |
Re: Try to add a module then put a global variable Example: [code] Module1 Public AddUpdate As String End Module [/code] On form1. [CODE]Private Sub Button1_Click() 'Assuming this button is an Add button AddUpdate ="Add" End Sub Private Sub Button2_Click() 'Assuming this button is an Update button AddUpdate ="Update" End Sub[/CODE] … | |
Re: why not join the two tables in 1 query it is more easy than making two queries and put it in 1 datagridview. but first, the two tables must be related. | |
Re: [QUOTE=Mcdermid;872707]I'm trying to calculate a column from a database called rogaine.mdb. I've been using an SQL statement to do this as I only want to calculate the points for certain teams. This is the code I've been using: Dim teams As DataTable Dim da As OleDb.OleDbDataAdapter Dim sql, connStr, teamName … | |
Re: 1. Install first MwSQL ODBC Connecto 5.1r, you can download it from MySQL website. 2. Provide this code: [CODE]Dim conn As New Odbc.OdbcConnection Dim connString As String = "DRIVER={MySQL ODBC 5.1 Driver};" _ & "SERVER= Your Server Name;" _ & "PORT=3306;" _ & "DATABASE=Your Database Name;" _ & "UID=Your MySQL … | |
Re: I guess this is what you want: [URL="http://khairulhabib.wordpress.com/2008/05/17/detecting-online-computer-on-lan-automatically-using-vbnet/"]http://khairulhabib.wordpress.com/2008/05/17/detecting-online-computer-on-lan-automatically-using-vbnet/[/URL] | |
Re: I will give you a sample which will guide you on this particular subject. In your Form1 suppose you have: 1 DataGridView1 1 Textbox1 1 Button1 In your Database suppose you have 1 Table1 1 Field1 = Textfield you can rename them if you like, so in your Button1_Click event … | |
Re: [QUOTE=willrose84;843107]Hi im very new to all this programing lark but was wondering if some one could tell me what im doing wrong, I am tring to creat a login box so you have to enter the corect details to use my form but it keeps filling in the textboxes with … | |
Re: Place this code in your Form_Load event suppose the textbox will store all the descriptions of our products. [CODE]Dim stringCols As New AutoCompleteStringCollection Dim str As String = "SELECT DISTINCT description FROM products ORDER by description asc" Dim cmdStr As New Odbc.OdbcCommand(str, conn) Dim dtreader As Odbc.OdbcDataReader = cmdStr.ExecuteReader() While … | |
Re: Please supply some of your codes so that we can determine which line gives an error. thanks | |
Re: Try this: [CODE]Imports System.Data Imports System.Data.OleDb Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim connStr As String = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=G:\Visual Studio Projects\test\dbtest.accdb;Persist Security Info=False" Dim con As Ne Oledb.Connection(connStr) con.Open() Dim cmd As String = "SELECT * FROM Table1" Dim adapter As … | |
Re: I assume this is your code under btnOK_Click [code]If radLT20.Checked = True Then txtDisplay.Text = "" & txtName.Text & "" & "is aged below 20" Elseif rad20To40.Checked = True Then txtDisplay.Text = "" & txtName.Text & "" & "is aged between 20 and 40" Elseif radGT40.Checked = True Then txtDisplay.Text … | |
Re: what version of MS Access you are using? | |
Re: [QUOTE=arunasingh;856009]I am developing a project in which i have combobox in that there are list of station and i want that when i type the words that will match to that station and that station is selected in combo box[/QUOTE] try this: [CODE]Private Sub Combobox1_KeyUp(ByVal sender As Object, ByVal e … | |
Re: Using CommandBuilder it should be: [CODE]Dim adp As New Odbc.OdbcDataAdapter("SELECT * FROM tablename WHERE PrimaryKey = '" & Texbox1.Tex &"'", yourconnection) Dim ds As New DataSet Dim cmdbuilder As New Odbc.OdbcCommandBuilder(adp) adp.Fill(ds) ds.Tables(0).Rows(0).Item("Field1") = Me.Textbox2.Text 'do the rest adp.Update(ds)[/CODE] | |
Re: [QUOTE=jackVB;856076]I want to update data using DataGridView in Visual Studio2008 with the following code. But it is not working. Plz help me. Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click cmd = New Odbc.OdbcCommand("UPDATE Table1 SET Name") Me.Table1TableAdapter.Update(DataSet1.Table1) MsgBox("Updated") End Sub[/QUOTE] i'll give you an example … | |
Re: [QUOTE=ryan311;853255]help please, how to save a data between the time of what user input in the 2 textbox. 1 textbox is for intime and the 2 one is out time. for example if the user input 7:30 - 9:30 Am Intime all i want is this is the only time … | |
Re: can you specify what LINE gives you that exception? | |
Re: in what line the error comes? | |
Re: Start building your project and show us what part of your code that do not work so that the forumers will help you solving it. | |
Re: the blinking stuff could be done in the Timer1_Tick event | |
Re: try this: [CODE]Dim DesignSQL As String = "INSERT INTO Design_tbl (CustmrID,[User],Builder,Model,Type) values ('" & _ CustID & "', '" & Val(username) & "', '" & CmbBuilder.Text & "', '" & _ cmbModel.Text & "','" & cmbType.Text & "') "[/CODE] if username is a string and if in your database is … | |
Re: [QUOTE=sanstepsan;851168]I have aseries of textboxes namely txtAlpha1, txtAlpha2, txtAlpha3 etc and txtBravo1, txtBravo2, txtBravo3 etc. I am trying to loop thro these by doing the following but of course it does not work. [code] For i = 1 To 25 If txtAlpha & i & .Text = txtBravo & i … | |
Re: [QUOTE=BeReady;851144]hi all, [code] Private anyVariable As String Private Sub uiAddButton_Click(ByVal sender As System.Object, Dim updateinvoicecom As New OleDbCommand(updateinvoice, Module1.connect) updateinvoicecom.ExecuteNonQuery() End If End If Module1.close() anyVariable = Me.uiInvoiceNotxt.Text invoice() End Sub [/code] [code] Public Sub invoice() Try Dim invoicedetail As String = "SELECT invoice.Item_No, invoice.Amount,invoice.Price,stock.Stock_Name FROM stock LEFT JOIN invoice … | |
Re: [quote]Dim response As String response = MessageBox.Show("Are you sure you want to exit?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) If response = 6 Then End ElseIf response = 7 Then Me.Close() End If [/quote] To understand quickly here's a similar code for your future reference: [code]Dim msgAnswer as MsgBoxResult msgAnswer = MsgBox ("Are … | |
Re: [QUOTE=kn2790;845055]firstly, thanks for replyin much appreciate it... ok i understand i need to compare the the values with the same variable type, i took out the [code] If myDataReader.HasRows = 0 Then [/code] bit and subbed it with the code you suggested but im still having a problem with [CODE]' … | |
Re: [QUOTE=crazyhorse09;843766]waynespangler is correct, you don't want to use TextChanged event for that.[/QUOTE] That's right textchanged is not recommended. My suggestion is to use a KeyPress or KeyUp/KeyDown event. Try this one: [CODE]Private Sub Textbox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Textbox1.KeyPress If e.KeyChar = Chr(Keys.Enter) Then If Me.Textbox1.Text … | |
Re: [QUOTE=Ramy Mahrous;844502]because you should pass integral value. So, Doesn't MySQL have profile to log the coming connection\transaction like MS SQL? you can check it, or I do recommend you to use MySQL library for .NET which on [url]http://MySQL.org[/url] instead of OLE[/QUOTE] The topic starter uses MS ACCESS database not MySQL … | |
Re: [QUOTE=EdVBDev;846090]I have three separate forms. Form1, Form2, and Form3 I declared Public var1 as Integer within Form1. Form2 and Form3 can see/access var1 as Form1.var1 However, when I declare Public var2 as Integer within Form2 (when it opens), Form3 (when opened) cannot access var2 whatsoever. Don't know what I'm missing. … | |
Re: [QUOTE=densman;845188]I am designing a picture identification application. When pictures have been uploaded, then i want to tag each of the pictures in list. As they appear via a NEXt button using one textbx[/QUOTE] i guess you should create a unique "ID" for each picture so that it is easy for … | |
Re: maybe you have missed something in the SQL statement something like "SELECT name,addresss FROM yourtable WHERE memberID = '" & txtSearch.Text & "'" WHERE clause is important in searching something in the database... | |
Re: so what's the problem?? | |
Re: Try this [code] Private Sub Combo1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Combo1.KeyPress If e.KeyChar=Chr(Keys.Enter) Then Me.Combo1.Items.Add(Me.Combo1.Text) 'Any text entered into the combobox text will be added into the combobox item list after hiting Enter Key End If End Sub [/code] | |
Re: [QUOTE=axfv;826299]I have a DataGrid bound to a DataTable. For various reasons, I don't want to allow users to sort the data, but I want to sort the data once by "Username" as well as resize the columns. I use DataTable.DefaultView.Sort = "Username" before binding it to DataGrid. If I then … | |
Re: [QUOTE=hkdani;827265][I]MessageBox.Show[/I] You're in the wrong forum. But that's ok, VB.Net is about the same as VB6. [code]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show("Welcome, to my Calculator", "Welcome", MessageBoxButtons.OK) End Sub[/code][/QUOTE] The topic starter uses VB.NET already lood at his codes you'll see the diff … | |
Re: In CR Designer Right Click the object you want to rotate then Select Format Object>Common tab then look for the "Text Rotation", there you can set the degrees at the combo box | |
Re: [QUOTE=herms14;825478]hi..I'm just a newbie programmer who needs some help. I'm trying to enter a date and save it in a mysql database. however the format in mysql is yyyy-mm-dd and the format in vb.net is mm-dd-yyyy. how can i format the date in vb in order to successfully enter it … |
The End.