2,383 Posted Topics

Member Avatar for GAiXz

I think Hericles was given the direction. You need to know how to make connection with databases (MSSQL,MySQL,Oracle,etc). Connectionstring.com provides you how to do it.

Member Avatar for GAiXz
0
152
Member Avatar for Nailroth

For transparency form see [URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/104127"]this thread[/URL] and [URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/238928"]this thread too[/URL]

Member Avatar for Jx_Man
0
132
Member Avatar for cs_1000100
Member Avatar for Aleksej

You can check file name length.. [CODE]Dim streamer As IO.StreamReader Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName.Length > 0 Then TextBox1.Text = OpenFileDialog1.FileName streamer = IO.File.OpenText(TextBox1.Text) Dim mystring() As String = streamer.ReadToEnd.Split(vbNewLine) ListBox1.Items.AddRange(mystring) End If End Sub[/CODE]

Member Avatar for Jx_Man
0
180
Member Avatar for honeybee2090

[QUOTE]i want to remove single items from list and want to keep duplicate items in listbox[/QUOTE] You mean just remove selected item?

Member Avatar for honeybee2090
0
112
Member Avatar for raheel88

Try this : [CODE]Private Sub cmdAddItem_Click() Static count As Integer Static name As String count = lstPoints.ListCount count = count + 1 name = "Point " & count lstPoints.AddItem name If count = 8 Then cmdAddItem.Enabled = False cmdRemoveItem.Enabled = True End If End Sub Private Sub cmdRemoveItem_Click() Size = …

Member Avatar for raheel88
0
1K
Member Avatar for VijayKumaran

This code will display scroling text from left to right in Label. [B]First set timer Enable = True.[/B] try this following code : [code=vb.net] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick label1.Text = Microsoft.VisualBasic.Right _ (label1.Text, 1) & Microsoft.VisualBasic.Left _ (label1.Text, Len(label1.Text) - 1) End …

Member Avatar for person_112
0
3K
Member Avatar for Alex_2011

[B]1. Total[/B] You can get total from TotalCost variabel since you already count it [ICODE]TotalCost += OrderMenu(1).ItemCost[/ICODE] But you put the declaration in every buttons so you can't use it properly. You need to put TotalCost in Global Declaration and remove all TotalCost declaration in every buttons. [CODE]Private OrderMenu(6) As …

Member Avatar for Alex_2011
0
369
Member Avatar for dweebmasterkun

Try this : [CODE]Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick Dim i As Integer = DataGridView1.CurrentRow.Index With DataGridView1 TextBox1.Text = DataGridView1.Item(0, i).Value TextBox2.Text = DataGridView1.Item(1, i).Value TextBox3.Text = DataGridView1.Item(2, i).Value End With End Sub [/CODE]

Member Avatar for poojavb
0
967
Member Avatar for Eternal Newbie

You can use SQL aliases on your sql query. e.g : [CODE=MS SQL]select Name as '1', City as '2' from Address[/CODE]

Member Avatar for Eternal Newbie
0
218
Member Avatar for pardeep3dec

>> I need a text box for entering only for 0 to 9,.,Delete key ,Backspace key and Enter key [CODE]Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Or Asc(e.KeyChar) = 13 Then e.Handled = True End If If …

Member Avatar for codeorder
0
152
Member Avatar for yeeitsneo

[CODE]Option Explicit Dim X As Integer, Y As Integer 'Declare variable X and Y as Integer Private Sub Form_Load() ' This following code to assing variable X and Y with Width and Height of Form X = Me.Width 'assign variable X with form Width Y = Me.Height 'assign variable Y …

Member Avatar for yeeitsneo
0
268
Member Avatar for M.Waqas Aslam

[URL="http://msdn.microsoft.com/en-us/library/system.data.sql.sqldatasourceenumerator.getdatasources.aspx"]See This[/URL]

Member Avatar for cyberdaemon
0
286
Member Avatar for Awais Ali

[QUOTE]Can anyone help me by giving out a complete tutorial on the step by step way a connecting to a database using VB6? [/QUOTE] Post your code. How far you doing this?

Member Avatar for WaltP
0
108
Member Avatar for collin_ola
Member Avatar for khizer03

You writing the code use C# or VB.Net? May you forgot to Change the equal sign (=) with slash (/) and Remove the "watch?" string.

Member Avatar for codeorder
0
121
Member Avatar for honeybee2090

Remove selected items : [CODE]Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged For i As Integer = 0 To ListBox1.SelectedIndices.Count - 1 ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) Next End Sub[/CODE]

Member Avatar for honeybee2090
0
87
Member Avatar for sharathg.satya
Member Avatar for yeeitsneo

So, What the error of your program? I don't get what exactly you want to ask?

Member Avatar for abelingaw
0
168
Member Avatar for bonzo2008

Its not an error. When you edit data your program will edit all record with name 'jones'. Since you didn't have an key/Id to know which 'jones' to edit. I suggest you to add Id Column as Key. So you can identifier which record to edit even they have the …

Member Avatar for Jx_Man
0
99
Member Avatar for weeraa

[URL="http://www.vb6.us/tutorials/create-your-own-vb6-resource-files-tutorial"]See this[/URL]

Member Avatar for weeraa
0
239
Member Avatar for Alex_2011

[CODE] Label1Display.Text = Stacks(0).ToString Label2Display.Text = Stacks(1).ToString Label3Display.Text = Stacks(2).ToString Label4Display.Text = Stacks(3).ToString Label5Display.Text = Stacks(4).ToString [/CODE]

Member Avatar for Alex_2011
0
179
Member Avatar for Neji
Member Avatar for weeraa

Try This : [CODE]Private Sub Streching() Picture1.ScaleMode = 3 Picture1.AutoRedraw = True Picture1.PaintPicture Picture1.Picture, _ 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, _ 0, 0, _ Picture1.Picture.Width / 26.46, _ Picture1.Picture.Height / 26.46 Picture1.Picture = Picture1.Image End Sub Private Sub Form_Load() Streching End Sub [/CODE]

Member Avatar for weeraa
0
718
Member Avatar for markdean.expres

Try this : [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Info As New FileInfo("D:\000.jpg") MsgBox("Name : " & Info.Name & vbCrLf & _ "Length : " & Info.Length & " bytes" & vbCrLf & _ "Type : " & Info.Extension & vbCrLf & _ …

Member Avatar for markdean.expres
0
371
Member Avatar for rugged1529

Still use 'DATE', Date also save the time. [CODE]create table class (schedule_num integer primary key not null, semester varchar(10), course_name varchar(14), credit int, department varchar(15), meeting_time DATE, meeting_place varchar(20), enrollment_limit int);[/CODE] Example : [CODE]select to_char(meeting_time,'HH24:MI:SS') from class[/CODE]

Member Avatar for hfx642
0
320
Member Avatar for Bheeman89

See this link : [URL="http://www.connectionstrings.com/sql-server-2008"]http://www.connectionstrings.com/sql-server-2008[/URL]

Member Avatar for Jx_Man
0
274
Member Avatar for Alex_2011

Where is your stack declaration? [ICODE]Dim Stack(4) As String[/ICODE] -> Your Declaration is for array You need to declare stack before add it. [ICODE]Dim MyStack as New Stack(4)[/ICODE] -> This for Stack To Add stack [ICODE]MyStack.Push(userMsg[/ICODE]) [CODE] ' Declare as global variable Dim MaxSize As Integer = 4 Dim MyStack …

Member Avatar for Alex_2011
0
173
Member Avatar for yeeitsneo
Member Avatar for sdimantova

this line not working : [icode]IO.File.Open(filePath, FileMode.Open)[/icode] Try to change with Process Function : [code=vb] If DialogResult.Yes Then Process.Start(filePath) ElseIf DialogResult.No Then MsgBox("you decided not to open") End If [/code]

Member Avatar for PraDevil
0
2K
Member Avatar for markee
Member Avatar for andrew1989

[QUOTE]i want to pass a text from a textbox in form1 to a label in form2[/QUOTE] This following code will transfer text in textbox in form1 to label in form2. [CODE]Private Sub Form_Load() Label1.Caption = Form1.Text1.Text End Sub[/CODE] [QUOTE]but the text in form1 is retrieved from a database.[/QUOTE] Different question. …

Member Avatar for WaltP
0
109
Member Avatar for Ziggy713

[CODE]Query = "update Prod_DB_Completed_Board set [Stock Level] = '" & TextBox2.Text & "' where Laminate = '" & ComboBox2.Text & "'" & "AND" & "'" ComboBox3.Text & "'"[/CODE] Missing Other Column Name : [CODE]"AND OtherColumName = " & "'" ComboBox3.Text & "'"[/CODE]

Member Avatar for M.Waqas Aslam
0
4K
Member Avatar for khizer03
Member Avatar for Jx_Man
1
330
Member Avatar for RASHIDDDDD
Member Avatar for Ziggy713

Don't Use AND [CODE]Query = "INSERT INTO PROD_DB_Complete_Board (ID, [Board Size], Laminate, [Stock Level]) Values('" & TextBox4.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox1.Text & "')"[/CODE]

Member Avatar for Reverend Jim
0
181
Member Avatar for Johan__
Member Avatar for rucci

[QUOTE=Joni123;1742358]Dear brothers, I also want to ask you guys about my problems. I have this VB6 application which uses Ms Access 2003 as a back-end. It was working well on WinXP platform. I want to install the application on a Win7 machine and i am having error on connection string. …

Member Avatar for AndreRet
0
1K
Member Avatar for PM312

Well, i don't really know what you mean about 'empty'. [URL="http://decipherinfosys.wordpress.com/2009/03/27/null-vs-empty-zero-length-string/"]Maybe this article can help[/URL]

Member Avatar for AndreRet
0
163
Member Avatar for iRoroKun
Member Avatar for AndreRet
0
106
Member Avatar for trisha0906

Why you not merge it as one sql query? [CODE]strsql = "select * from student_info where Surname, First_Name, Middle_Name not in " _ & "(select Surname, First_Name, Middle_Name from accounting_system)" MsgBox("student")[/CODE]

Member Avatar for ChrisPadgham
0
146
Member Avatar for albhert2728
Member Avatar for Hawk123

>> Is it possible to have the menu and header static and loads each form in one dynamic container. Yes. You can make parent-child form. Say Form1 as the container/parent and form2 as child. Set IsMdiContainer in Form1 Properties as True. In menu event : [CODE] Dim a As New …

Member Avatar for Hawk123
0
98
Member Avatar for Aphrite

Or you can check the length of filename. [CODE]If OpenFileDialog1.FileName.Length > 0 Then Dim loader As New IO.StreamReader(OpenFileDialog1.FileName) TextBox1.Text = loader.ReadLine TextBox2.Text = loader.ReadLine ... loader.Close() End If[/CODE]

Member Avatar for Jx_Man
0
216
Member Avatar for twistercool

Just do both of them at the same time. In any event of control you can add item to listbox or combobox and add it to database. Same action for edit, delete and transfer. E.g : [CODE]Private Sub Command1_Click() List1.AddItem Text1.Text 'your codes to add item to database End Sub[/CODE]

Member Avatar for Jx_Man
0
158
Member Avatar for november_pooh

See if this helps : [CODE]Dim StartPos, Counter As Integer Dim FindString, ReplaceText As String FindString = "test" ReplaceText = "MyString" For Counter = 1 To Len(Text1.Text) StartPos = InStr(Text1.Text, FindString) If StartPos > 0 Then Text1.SelStart = StartPos - 1 Text1.SelLength = Len(FindString) Text1.SelText = "" + ReplaceText End …

Member Avatar for ChrisPadgham
0
235
Member Avatar for Sawamura

You can use SysInfo Component to get information about battery status. Project->Component->Microsoft SysInfo Control Add it to Form and use this following codes : [CODE]Private Sub Form_Load() List1.AddItem "BatteryFullTime = " & _ Format$(SysInfo1.BatteryFullTime) List1.AddItem "BatteryLifeTime = " & _ Format$(SysInfo1.BatteryLifeTime) List1.AddItem "BatteryLifePercent = " & _ Format$(SysInfo1.BatteryLifePercent / 100, …

Member Avatar for Jx_Man
0
379
Member Avatar for irfan mustafa

[URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/236985"]See this thread.[/URL]

Member Avatar for ChrisPadgham
0
59
Member Avatar for mantapgan

See this "tanggalpinjam.Text and tanggalbaliktxt.Text" I think this the problem. You want to insert a date of borrowed date n returning date but you insert it as text. Just convert it to date format. Make sure the type of both column is [B]date[/B] in your database not text or numeric.

Member Avatar for mantapgan
0
148
Member Avatar for zerofreak

I suggest to trap it when user input the characters. So, users can only input the specific characters. Example : (This text box only accept numbers input only) [CODE]Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Then e.Handled …

Member Avatar for zerofreak
0
175

The End.