Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #1K
~99.5K People Reached
Favorite Tags

51 Posted Topics

Member Avatar for StatiX

[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 …

Member Avatar for gever
0
73K
Member Avatar for datajaya_ap

[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 …

Member Avatar for alifax89
0
2K
Member Avatar for ads248

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]

Member Avatar for jayacer
0
8K
Member Avatar for nokomoli

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 …

Member Avatar for Nikita Jetani
0
2K
Member Avatar for c0deFr3aK

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 …

Member Avatar for c0deFr3aK
0
92
Member Avatar for Trekker182

[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"

Member Avatar for chirag.makwana
0
236
Member Avatar for c0deFr3aK

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 …

Member Avatar for Lusiphur
0
149
Member Avatar for aircooled
Member Avatar for jallan2009

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 …

Member Avatar for pritesh2010
0
221
Member Avatar for drexler_kk

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] …

Member Avatar for MumtazKhan
0
123
Member Avatar for riddhi84
Member Avatar for manutd4life

I guess the INSERT syntax would look like this: "INSERT INTO Table_Name(Field1, Field2, Field3) VALUES ('" & Text1.Text &"','"& Text2.Text &"','" & Text3.Text &"')"

Member Avatar for kvprajapati
0
116
Member Avatar for Cliffs0fdover

[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, …

Member Avatar for toko
0
141
Member Avatar for success_always

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] …

Member Avatar for jireh
0
205
Member Avatar for Eliza123

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.

Member Avatar for Eliza123
0
914
Member Avatar for Mcdermid

[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 …

Member Avatar for Mcdermid
0
129
Member Avatar for santhanalakshmi

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 …

Member Avatar for PinoyDev
0
162
Member Avatar for Zandermander

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]

Member Avatar for Zandermander
0
3K
Member Avatar for bharanidharanit

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 …

Member Avatar for c0deFr3aK
0
103
Member Avatar for willrose84

[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 …

Member Avatar for willrose84
0
154
Member Avatar for bharanidharanit

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 …

Member Avatar for vb5prgrmr
0
117
Member Avatar for tinajl
Member Avatar for c0deFr3aK
0
110
Member Avatar for ranitsaha

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 …

Member Avatar for c0deFr3aK
0
315
Member Avatar for Nawsheen

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 …

Member Avatar for Nawsheen
0
118
Member Avatar for GeorgeFarr
Member Avatar for arunasingh

[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 …

Member Avatar for c0deFr3aK
0
99
Member Avatar for jackVB

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]

Member Avatar for jackVB
0
142
Member Avatar for jackVB

[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 …

Member Avatar for c0deFr3aK
0
118
Member Avatar for ryan311
Re: help

[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 …

Member Avatar for ryan311
0
127
Member Avatar for kn2790
Member Avatar for firoz.raj
Member Avatar for coolshail_87

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.

Member Avatar for c0deFr3aK
0
82
Member Avatar for ald4057
Member Avatar for VIPER5646

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 …

Member Avatar for VIPER5646
0
120
Member Avatar for sanstepsan

[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 …

Member Avatar for sanstepsan
0
163
Member Avatar for BeReady

[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 …

Member Avatar for BeReady
0
125
Member Avatar for Nawsheen
Member Avatar for Nawsheen

[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 …

Member Avatar for Teme64
0
114
Member Avatar for kn2790

[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]' …

Member Avatar for Teme64
0
277
Member Avatar for Nawsheen

[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 …

Member Avatar for Nawsheen
0
124
Member Avatar for bored4

[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 …

Member Avatar for Ramy Mahrous
0
175
Member Avatar for EdVBDev

[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. …

Member Avatar for c0deFr3aK
0
103
Member Avatar for densman

[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 …

Member Avatar for Ramy Mahrous
0
109
Member Avatar for taylormsj

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...

Member Avatar for taylormsj
0
140
Member Avatar for joseph19.k
Member Avatar for student784

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]

Member Avatar for c0deFr3aK
0
1K
Member Avatar for axfv

[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 …

Member Avatar for G-bot
0
155
Member Avatar for kupido0502

[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 …

Member Avatar for c0deFr3aK
0
334
Member Avatar for Mitha

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

Member Avatar for c0deFr3aK
0
140
Member Avatar for herms14

[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 …

Member Avatar for c0deFr3aK
0
1K

The End.