2,383 Posted Topics

Member Avatar for mahela

Try This : Public Conn As New ADODB.Connection Private Sub Access_Connector() Set Conn = New ADODB.Connection Conn.Provider = "microsoft.jet.oledb.4.0" Conn.CursorLocation = adUseClient Conn.Open App.Path & "\project.mdb" End Sub Private Sub GetData() Set rs = New ADODB.Recordset rs.Open "SELECT * from goods ", Conn, adOpenDynamic, adLockBatchOptimistic While Not rs.EOF List1.AddItem rs.Fields("tabid") …

Member Avatar for AndreRet
0
162
Member Avatar for jeanray

Hi gino_j... This thread too old and you post in wrong section. this for vb 6 not for vb.net :)

Member Avatar for Darkpiss
0
3K
Member Avatar for lerkei

u just to handle keychar. try this following code : [CODE=vb] Private Sub text1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles text1.KeyPress If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _ And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then 'space allowed If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then …

Member Avatar for akgs
0
3K
Member Avatar for Jx_Man

This code to save, Edit and delete data in VB.Net using SQLServer as backend. this code is continuance from my previous post "Show Data in DataGrid with VB.Net 2003 and SQLServer 2000". so i didn't write code how to connect SQLServer 2000 with VB.Net 2003 cause this already in there. …

Member Avatar for anuj6928
1
21K
Member Avatar for Blank808
Member Avatar for mahela

First, your code is not running. You missing 's' in every ListItems and SubItems statements. Second, As default you can't select entire rows. It's because version 5.0 (SP2) does not support it. but if you use version 6.0, your listview will able to do that with set FullRowSelect = true. …

Member Avatar for mahela
0
2K
Member Avatar for arie92

[Read this thread](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/436489/transfer-data-from-one-form-to-another) You can use andre concept. Add module, make public variable to accomodate your inputs in form 1 to form 4. set every input to those variable in each form. Ex : 'in module Public a,b,c,d as Integer 'in form1 a = Val(Text1.Text) 'in form2 b = Val(Text2.Text) …

Member Avatar for Jx_Man
-1
255
Member Avatar for shoebodh
Member Avatar for cheekangteh

You can use Timer control. Set Enabled=True on Timer properties Set Interval as you needed. Interval in milliseconds. (e.g 1000 = 1 Second) Then put your checking code in Timer event : [CODE]Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ' Your Code End Sub[/CODE]

Member Avatar for lebo.bytes
0
1K
Member Avatar for paoi00

What you mean about disappeared? you mean remove selected item from combobox? Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged ComboBox1.Items.Remove(ComboBox1.SelectedItem) End Sub

Member Avatar for paoi00
0
196
Member Avatar for honeybee2090

1 Textbox, 1 Button. Result showing in form caption : Private Sub Command1_Click() Dim TextLines As Variant TextLines = Split(Text1, vbNewLine) Form1.Caption = "Sockz-" & (UBound(TextLines) + 1) End Sub

Member Avatar for honeybee2090
0
533
Member Avatar for kipslem

missing single quote : [CODE]Dim cmd2 As New OleDb.OleDbCommand("DELETE FROM tblPNGATSAExecutive WHERE ExecutiveID = '" & lvData.Items(ItemNo).SubItems(0).Text & "'", conn)[/CODE]

Member Avatar for klooonhie
0
2K
Member Avatar for geetajlo

connect with database?what it is? if used database binding in datagrid try with LIKE operator to searching more thorough.

Member Avatar for derpking
0
327
Member Avatar for VidhyaThiyagu

actually you didn't give much information for your problem.what database that you've using? see this link : [URL="http://www.codeproject.com/KB/database/relationaladonet.aspx"]http://www.codeproject.com/KB/database/relationaladonet.aspx[/URL]

Member Avatar for ahmedyakson
-1
2K
Member Avatar for pao286
Member Avatar for Arpita Asthana
Member Avatar for zuniza

hi zuniza, hmm interesting project, you must work hard to make all. i agree with Walkere to this recommended [QUOTE]In particular I'd recommend one of two: * phpBB * Simple Machines Forum[/QUOTE]

Member Avatar for artonweb
0
261
Member Avatar for Jaseem Ahmed
Member Avatar for pj.lopez.58

vbDatabaseCompare uses the current setting of the database's string comparison operator. Normally this will use the computer's language setting to handle (e.g.) accented characters, and will be case insensitive. The alternative vbBinaryCompare will compare the exact ASCII representation of the character. For example: `Instr(1,"XYZabcxZ","x",vbDatabaseCompare)` 1 `Instr(1,"XYZabcxZ","x",vbBinaryCompare)` 7 The first example …

Member Avatar for Jx_Man
0
116
Member Avatar for angel06

Use UCase() or LCase () function. all string will be converted to upper or lower string If UCase(Text1.Text) = UCase("red") And Label4.BackColor = vbRed Then score = score + 1 Label6.Caption = score End If or if you just want to make uppercase the first string mystring = Text1.Text If …

Member Avatar for debasisdas
0
558
Member Avatar for Bile

I believe that problem is Picture_Name. You put Picture_Name in your insert statement but it never been declared in CmdSave. Why you don't use lblPicture_Name? it hold picture name too. Conn.Execute "INSERT INTO Ministers_AccountTB(User_Name,Password,Prefix,Privilege,Passport) VALUES ('" & txtUser_Name.Text & "','" & txtRetype_Password.Text & "','" & cmbPrefix.Text & "','" & cmbPrivilege.Text …

Member Avatar for AndreRet
0
311
Member Avatar for ruudycruise
Member Avatar for Dili1234
Member Avatar for apking

make a module to connect vb.net with sql server. add this code to module : [CODE]Imports System.Data Imports System.Data.SqlClient Module Connect Public conn As SqlConnection Public Function GetConnect() conn = New SqlConnection("Server = YourServerName;" & "initial Catalog = yourDatabaseName;" & " Trusted_Connection=yes") Return conn End Function End Module [/CODE] you …

Member Avatar for khia02
0
4K
Member Avatar for johncornelius23

Your open recordset parameter not completed. Sub Open([Source], [ActiveConnection], [CursorType As CursorTypeEnum = adOpenUnspecified], [LockType As LockTypeEnum = adLockUnspecified], [Options As Long = -1]) It should looks like this : rspassword.Open "Select * from table1", Con, adOpenDynamic, adLockBatchOptimistic

Member Avatar for AndreRet
0
139
Member Avatar for themaj

All projects use .Net 2.0, 3.0, 3.5, or 4.0 You can change the version in Project Properties -> Compile -> Advanced Compile Option

Member Avatar for M.Waqas Aslam
0
314
Member Avatar for santhini

Put this on your form code : Protected Overrides Function ProcessTabKey(ByVal forward As Boolean) As Boolean MyBase.ProcessTabKey(forward) MsgBox("Tab key") ' Change this with your retrieving code or function name End Function

Member Avatar for M.Waqas Aslam
0
100
Member Avatar for ayat abukhadra
Member Avatar for Estella
Member Avatar for palvani
0
651
Member Avatar for HibaPro
Member Avatar for Begginnerdev
0
280
Member Avatar for timk25
Member Avatar for chrisdent1986
Member Avatar for g.prabu

[code=mssql]DELETE FROM emp e WHERE rowid>(SELECT MIN(ROWID) FROM emp WHERE e.empno=empno)[/code]

Member Avatar for msi
0
929
Member Avatar for pete08

see this thread... [URL="http://www.daniweb.com/forums/thread89479.html"]http://www.daniweb.com/forums/thread89479.html[/URL]

Member Avatar for Ailton Junior
0
110
Member Avatar for rynop
Member Avatar for cacaotree
0
192
Member Avatar for technogeek_42

this a simple way to play some media files, but maybe cannot play mp3.file you can use mmControl 6.0 on component : Private Sub Form_Load() [CODE]MMControl1.Notify = False MMControl1.Wait = True MMControl1.Shareable = False[/CODE] 'to play .avi file [CODE]MMControl1.FileName = "c:\test.avi" MMControl1.Command = "Open"[/CODE] ' to play .wav file [CODE]MMControl1.FileName …

Member Avatar for AndreRet
0
3K
Member Avatar for hafizurahman

what u mean about 6 data here? 6 rows added when you click add or 6 data (6 fields) in on row? [QUOTE]sql = "insert into Pengurus(name, staff no.,items, quantity, date )" & "values ('" & txtQtt.Text & "', '" & txtDate.Text & "') "[/QUOTE] in your sql statment you …

Member Avatar for Reverend Jim
0
828
Member Avatar for SolTec

try this following code : [CODE=vb]Public Sub ClearTextBox(ByVal root As Control) For Each ctrl As Control In root.Controls ClearTextBox(ctrl) If TypeOf ctrl Is TextBox Then CType(ctrl, TextBox).Text = String.Empty End If Next ctrl End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ClearTextBox(Me) End Sub[/code] …

Member Avatar for Pie46
0
9K
Member Avatar for nav010

other suggestion use timer. question for u : why teme64 suggestion with sleep() function doesn't work for u? cause i think is better to use sleep than timer control.

Member Avatar for mad4x4
0
8K
Member Avatar for vanesh

[QUOTE=vanesh;1768092]How to connect datagrid from database using adodb connection. so that the records in the database will display in the datagrid. I have category here that i want to display to datagrid: ID, LName, FName, GLevel. I need a code for that. THANK YOU![/QUOTE] Connect to what database?

Member Avatar for mustaffa hasan
0
331
Member Avatar for mansi sharma

[code=vb] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Item As String For Each Item In ComboBox1.Items With ComboBox2.Items .Add(Item) End With Next End Sub[/code]

Member Avatar for somu1205
0
621
Member Avatar for twistercool

Don't put Remaining items on purchasing table. Put it on their own table. (e.g Reebok, Adidas,..) So you just update Stock Field in related table (adidas or reebok, etc) every transactions recorded in table purchase.

Member Avatar for twistercool
0
207
Member Avatar for ISAYA VAIMBA

hi isaya, how far you doing this? post your code and we will trying to help you,

Member Avatar for Jx_Man
0
67
Member Avatar for Mr_Man

there are many ways : 1. put the exe file on startup folder (manually) 2. Get the Startup folder and copied your exe file to startup folder. 3. Use registry to run your program when windows start.

Member Avatar for M.Waqas Aslam
0
2K
Member Avatar for problematic:)

[QUOTE=jennylynB;1758311]hi.....im jennylyn,i would like to ask you guys if what would be a code for SEARCH in database....like if we would find the name or gender????pls post a code guys....need it in our activity!!!!!!thanks..............[/QUOTE] Post your own thread [URL="http://www.daniweb.com/forums/newthread.php?do=newthread&f=4"]here[/URL]. Also post the code you working on.

Member Avatar for sai.pawar.p
1
2K
Member Avatar for sidyusuf
Member Avatar for razamughal67

See if this helps : [CODE]Private Sub Recycle2(ByVal FQFileOrFolder As String) 'Late bound. Dim Delim As Integer Dim FItem As Object Const ssfBITBUCKET = 10 Delim = InStrRev(FQFileOrFolder, "\") With CreateObject("Shell.Application") For Each FItem In .NameSpace(Left$(FQFileOrFolder, Delim - 1)).Items If Not FItem.IsLink Then If UCase$(FItem.Name) = UCase$(Mid$(FQFileOrFolder, Delim + 1)) …

Member Avatar for deepakbshitole
0
1K
Member Avatar for weeraa

You can capture the form resizing event then set the form into normal size. Private Sub Form_Resize() If (Me.WindowState <> vbMinimized) Then Me.Width = 4800 Me.Height = 3600 End If End Sub And set max button to false.

Member Avatar for weeraa
0
466
Member Avatar for razamughal67

Add icon to imagelist. use icon picture (.ico) and change the "**view**" to "**0-lvwIcon**" on listview properties assign icon image from imagelist to listview.

Member Avatar for Jx_Man
0
2K
Member Avatar for Sawamura

i used this to load from sqlserver 2000 [CODE]Private Sub ReadData() Dim i As Integer Dim cmdUser As New SqlCommand Dim daUser As New SqlDataAdapter Dim dsUser As New DataSet Dim dtUser As New DataTable Dim conn As SqlConnection conn = GetConnect() Try cmdUser = conn.CreateCommand cmdUser.CommandText = "SELECT * …

Member Avatar for Iamateur
0
380

The End.