- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 3
- Downvotes Received
- 14
- Posts with Downvotes
- 13
- Downvoting Members
- 4
53 Posted Topics
I have connected VB.net and mySQL on a the same PC before, but I have no Idea how to connect VB.net to a remote PC(LAN) I've only changed the server This is my code. I removed some of the details, but it works on server=localhost [CODE] conn = New MySqlConnection() … | |
Does anyone have any idea how to set the DateTimePicker's UpDown buttons to add/minus 30mins only instead of 1min? | |
My [B]first column does not align to center[/B], although the sub-columns aligns perfectly [CODE=vb] Listview1.Columns.Add("Column1", 100, HorizontalAlignment.Center) Listview1.Columns.Add("Column2", 100, HorizontalAlignment.Center) Listview1.Columns.Add("Column3", 100, HorizontalAlignment.Center) [/CODE] | |
Re: If you are looking for an easier way(hack), try my code. [CODE=vb] Dim cache As String = "" Private Sub Textbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Textbox1.TextChanged If IsNumeric(Textbox1.Text) = True Then cache = Int(Textbox1.Text) Else Textbox1.text = cache End If End Sub[/CODE] [B][COLOR="Red"]This code is a … | |
Re: There is something wrong with your [B]echo[/B] [CODE]echo $result;[/CODE] | |
Hi, I am using the AjaxControlToolkit's AutoCompleteExtender without a Web Service(PageMethod). **It is working fine on my local machine, but AutoCompleteExtender won't work in the IIS but other AjaxControlToolkit does.** I've searched around but none applies to my problem. It is running in IIS-6, and Framework 4.0. **Heres my code:** … | |
I am trying to populate an ArrayList using the elements from a DataTable. I know I could do this using Loop, but I am trying to figure out how to using AddRange. Here's my code: [CODE]SomeArrayList.AddRange(SomeDataTable.Rows.Item(0).ItemArray)[/CODE] The problem is that I can pass the collection except for the Zeroth element. … | |
Re: If you are planning to put them to an array. [CODE] dropdownlist.Items.CopyTo(SomeArray,0) ' First argument, the array. Second is the index of the array. [/CODE] | |
Anyone can tell my why it keeps saving at My Documents? [CODE] $newfile = 'temp.xls'; $wkb->SaveAs($newfile); [/CODE] If I [B]echo[/B] $newfile, it will display 'http://localhost/test/excel/temps.xls' Its suppose to save it at same level right? wrong, it keeps saving at "My Documents" How is that possible? Thanks | |
Is it possible to read and write excel files on PHP4? If yes, how? Thanks | |
Re: If I understand correctly, yes you can compare subitems just like comparing textboxes. [CODE=vb]ListView1.Items(0).SubItems(3).Text = ListView2.Items(0).SubItems(3).Text[/CODE] | |
How do you set the FileSystemWatcher.Filter to check only two files. Here's my code that doesn't even work. [CODE=vb]watcher.Filter = "*.txt|*.ini"[/CODE] Thanks Alot | |
Re: Let me first get this straight. You want sorta like: [B]Game 1, User 100 Game 2, User 90[/B] Instead you get this? [B]Game 2, User 90[/B] | |
Can anyone tell my why the code... [CODE=vb] Form1.Controls.Remove(myCustomControl) [/CODE] ...does not remove the control. Because whenever I remove a control and add it again, it does not Load but rather just changes its visibility from false to true and all the variables are not reloaded. I tried to use … | |
How do I curve the edge of a User Control? | |
Re: First set [B]Anchor[/B], of the label from properties window, to [B]None[/B]. Then replace your code with this NEW code. [CODE=vb]lblnumber.Top = Me.Height/2 lblnumber.Left = Me.Width/2[/CODE] Your welcome | |
I'm a graduating IT student, proficient in software development and website development, I can also do networking administration. But I prefer software development, second would be website development. I am deciding whether should I: [LIST] [*][B]advance to a full-time on Master's degree[/B] OR [*][B]advance my career/experience in the work place[/B] … | |
Re: You need to save the values on an external file(Settings.txt) | |
Re: [CODE=vb] Dim myDA As New OleDbDataAdapter myCmd.CommandText = "select distinct Name from T_Person where personid = '" & txtno & "'" myDA.SelectCommand = myCmd myDR = myCmd.ExecuteReader() While (myDR.Read()) myDR("Name")) End While[/CODE] | |
How do I Load an excel file to the PrintPreviewDialog? [CODE=vb] Imports Excel = Microsoft.Office.Interop.Excel Private Sub btnPrintPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintPreview.Click Dim xlApp As Excel.Application Dim xlWorkBook As Excel.Workbook xlApp = New Excel.ApplicationClass xlWorkBook = xlApp.Workbooks.Open(Application.StartupPath & "report_summary.xlsx") MyPrintPreviewDialog.Document = xlWorkBook If MyPrintPreviewDialog.ShowDialog() = … | |
Re: OP wants to run a code whenever a Form2 is shown. [CODE=vb] Private Sub Form2_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged If Visible = True Then MsgBox(testString) End If End Sub [/CODE] | |
Re: [B]Me[/B] is the form. Your code is sorta like Form1.organisms organisms is not a member of Me/Form, because the variable is a declared on the module. Thats why when you declare organisms in Me/Form, it runs fine. Remove [B]Me[/B] | |
Re: So you want to attach a file using "C:\test\xxxxxx[B]LK[/B]x[B].pdf[/B]"? You can use .contains . | |
Re: Form1 Button Event [B]Me.Hide Form2.Show[/B] Form2 Button Event [B]Me.Hide Form1.Show[/B] | |
Re: Save it to a public variable. Public RadioSelected As Integer = 0 Everytime the Dialogbox loads, tell it to select the radiobutton depending on the value of [B]RadioSelected[/B] Everytime you press OK, save the value to [B]RadioSelected[/B] based on selected radiobutton | |
Re: Is the login form the first form you created? | |
I know it is as simple as it is, I've search around the internet and I came up with nothing. Maybe I don't know what to search for. Basically my datetimepicker format is set to year only. My string is "2009" I want the datetimepicker-year to set as the year … | |
How do you call Subs/Functions inside a User-Control? Modules and Forms does not recognize the public subs/functions inside a user control. | |
Why am I getting this error during design time? [B]Error Number 5: Key cannot be null [/B] [CODE=vb] If Me.Visible = True Then If RetrieveSubjectsAndSection(Username, Subject) = True Then InsertSubjectsAndSection(Username,Subject) End If End If [/CODE] [B]RetrieveSubjectsAndSection[/B] function checks if record exist. The code is written inside a Usercontrol. Also I … | |
I am coding like usual, haven't click anything I don't know. Then suddenly I got an error [B]"Could not find type 'LFRv2.AdminTabEdit'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has … | |
Re: [QUOTE=adatapost;1009287]Set [b]FormBorderStyle[/b] [code] Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None [/code][/QUOTE] I don't think he is talking about resizing it. | |
How come when I load my project on Visual Studio 2008, it shows a MySQL error:[B] Unable to connect to any specified MySQL hosts.[/B]? then another error: [B]Access denied for user[/B] I am not yet running the application. | |
My App updates two tables at once(username from accounts and orders), but if second tables does not contain the same record(no orders) then it only updates first table(accounts) This code works, but I am trying to merge them into a single string [CODE=vb] ' Multi: True = Update Both Tables … | |
I have created a very long code on my app for checking if a record exist then insert. Is it possible for a single SQLString to check if records exist then update or insert? Sorta like [CODE] IF NOT EXISTS (SELECT column1 FROM table WHERE column1 = [COLOR="Red"]'sample1'[/COLOR]) THEN (INSERT … | |
MySQL Does not UPDATE second column. [CODE=vb] SQL = "UPDATE sampletable SET column1 = 'C1sample1'" & _ ",column2 ='C2sample1'" & _ "WHERE column2 = 'C2sample1'" [/CODE] | |
How do you return multiple values in a function? | |
My App edits data on a listview, by clicking on a row then clicking the edit button btnEdit. [CODE=vb] Dim PrimaryKey as String Private Sub ListView1_MouseDoubleClicklstSearch.MouseClick With .SelectedItems(0) PrimaryKey = .SubItems(0).Text End With End Sub Private Sub btnEdit_Click If ListView1.SelectedItems.Count > 0 Then ' Show dialog box Else MsgBox("Select First") … | |
Re: A centralized DB(Local) for storing usernames, passwords, level, etc. Installing DB on each machine post security issues. Application checks account's level and displays only what is needed to display. Example: You have two forms, both forms are able to access by the admin. Form2 cannot be accessed by a normal … | |
I received this error whenever I update an int(3) type field. [B]Error: 438 public member close on type integer not found[/B] This is my code [CODE=vb] conn.ConnectionString = "server=localhost;user id=root;password=;database=test" SQL = "UPDATE testTable SET int = 1 WHERE Name= 'Bob'" Try Dim myData With myCommand .Connection = conn .CommandText … | |
How do I use the User-Controls as a form within a Form? This is my answer to my problem located on [URL="http://www.daniweb.com/forums/thread214973.html"]this thread[/URL] As seen in the original thread's solution, I've used solution #2. Instead of switching forms, I've used switching panels and the controls are contained in those panels. … | |
I don't know how to explain this more clearly than I can. The codes in my form are getting too many/long. How do you split the codes into another? and still having the same classes and events in order to [U]reduce the amount of codes in the form.[/U] Sorta like … | |
Re: ExecuteNonQuery is only for deleting, inserting, and updating tables. | |
Re: The code just connects to the database, it doesn't retrieve data You should read this. [url]http://www.daniweb.com/forums/post979710.html#post979710[/url] [QUOTE=sknake;980415]Which query is giving you the error -- you have two? Also can you please post the exception you're receiving?[/QUOTE] Probably from the first one because the second is just an SQL command. Kindly … | |
Re: [CODE=vb] Dim String1 As String = "First String" Dim String2 As String = "Second String" ' Or assign a value after declaration String1 = "First String" String2 = "Second String" Label1.text = "Both String: " & String1 & String2[/CODE] Kindly mark thread as solved. | |
Re: Try displaying the SQL as a Label in your form to see if some of the txt.Text is null. | |
Re: [QUOTE=Arunabh Nag;978746]Can you please illustrate how searching for data in MS.ACCESS can be done using an OLEDB connection..??[/QUOTE] Are you able to connect to the database? |
The End.