- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
43 Posted Topics
Re: Hi Mikey. Use % instead of * for your wildcard "SELECT Product_Name FROM tbl_ProductInformation WHERE Product_Name LIKE '%" & CurrentEntry & "%'" Just a quirk of oledb | |
Re: Hi clocker, think you may not have added a reference to adodb Click on Project, Add Reference, click on the COM tab, scroll down the list and select Microsoft ActiveX Data Objects 2.8 Object Library (or whichever version you wish) and click ok | |
Re: hi. Think you need fruit LIKE '%a%' or fruit LIKe '*a*' wildcard * or % depends on your database access - Access/sqlserver/oleDB etc. See what works. Substitute "fruit" with the appopriate field name. | |
Re: hi Mike. Suspect the root of your problem is this: [CODE]System.Media.SystemSounds.Beep.Play[/CODE] plays a beep [CODE]System.Media.SystemSounds.Question.Play[/CODE] doesn't play anything Not all windows system sounds are allocated an actual wav file by default. In order to get the question.play to actually make a sound you may need to go into control panel … | |
Re: [CODE]For I = 1 To 8 Step 1 If xlSht.Cells(I, 1).Value = "ID" Then FCol = I ElseIf xlSht.Cells(I, 1).Value = "L" Then LCol = I ElseIf xlSht.Cells(I, 1).Value = "Lg" Then LgCol = I End If Next I[/CODE] or better still try select case. btw suspect this should be … | |
Re: Hi cyberdaemon, not sure about your sql statement but think you need to create an oledb command object and use ExecuteNonQuery like this: [CODE]con.Open() MsgBox("dbase connected") Dim cmd As New OleDb.OleDbCommand("CREATE TABLE emp_info(" & "emp_id INTEGER NOT NULL," & "lname VARCHAR(40)," & "School_name VARCHAR(40), level varchar(40))", con) cmd.ExecuteNonQuery()[/CODE] Might also … | |
Re: below Catch ex As Exception type this [CODE]msgbox (ex.Message)[/CODE] | |
Re: Hi Oleg, difficult to know without further info, but I suspect you need to properly dispose of your nodes' timer objects. Perhaps you might try something like this: [CODE]Dim node As mini_node For Each node In nodesCollection node.Timer.Stop() node.Timer.Dispose() Next nodesCollection.Clear()[/CODE] Alternatively have your class implement IDisposable (type "Implements IDisposable" … | |
Re: hi ryan, I'm a bit rusty on adodb but I've got a feeling recordset.MoveFirst needs to be called before looping through records. Something like this: [CODE] With rs1 'First check there are records If Not (.BOF And .EOF) Then .MoveFirst() Do While Not .EOF 'Add your listview stuff .MoveNext() Loop … | |
Re: Hi Emad. You tell us the query "seems to fail", but you don't tell us how. Is an exception thrown? Or is the data not being returned as you expected? Here's a guess though: If your customer names datatable is strongly typed (after using a wizard?), it probably has a … | |
Re: Hi Rachel, you may get better answers from the MS SQL forum - [url]http://www.daniweb.com/forums/forum127.html[/url] But here's a hunch anyway: Might there be a problem mapping fields from source to destination? Are you sure the destination phone field is expecting text? myBulkCopy.ColumnMappings.Add(blaah blaah) | |
Re: Hi Jeff, not sure if I understand you correctly, but isn't this just a matter of adding the same project to two different vb.net solutions? SOlution1 SOlution2 SharedFormProject (FIle - addexisting project - sharedformproject.vbproj) Being careful, of course, that changes to the shared project for the benefit of solution1 may … | |
Re: Hi Mike, You can fill a datatable directly without having to create a dataset. When you set a combobox's datasource to a datatable, you don't have to loop through the rows manually. So you can trim down your code quite a lot: [CODE] Dim connString As String = "Data Source=localhost;Initial … | |
Re: hi ppenno it sounds like an interesting task, but I suspect nobody has replied because a litte more info is required. I'm guessing it is some kind of assignment - so what kind of data are you given to start with, if any? In your database, do you have a … | |
Re: Hi radnam. Looks like you need two sqlconnection objects, one local, one for vpn, and you need to be able to select one or the other based on vpn availablity. Also, you probably want to avoid waiting forever for db connection timetouts when the vpn db is unreachable. So, consider … | |
Re: hi zarulhamdi, the simplest way to do something periodically is to use a timer - drag a timer from the toolbox onto your form. Set the interval and enable the timer either in the property window or in code like this: [CODE] Private Sub Form1_Load(ByVal sender As Object, ByVal e … | |
Re: Hi captain Jack THis all seems a lot of hard work considering the purpose is merely to copy a file. How big is your Hosts file? If it is at least tens of megabytes then perhaps we'd understand the need for a progress bar. Perhaps it is taking a long … | |
Re: Hi edriso Be careful of the difference between [CODE]ComboBox1.SelectedItem ComboBox1.SelectedItem.ToString ComboBox1.SelectedText ComboBox1.SelectedValue[/CODE] I suspect this may work, though it depends of course on the contents of your combobox: [CODE]"select * FROM CLARUS where product='" & ComboBox1.SelectedText & "'"[/CODE] | |
Re: hi eladreznik I think maybe index should be CurrentRow.Index + 1 irrespective of e.delta. This line is causing the problem: [CODE]index = grdAccountTypes.CurrentRow.Index + 1 + 1[/CODE] | |
Re: Hi Sarama2030 Create a form, add a textbox and a label and add this code [CODE] Private WithEvents Timer1 As System.Windows.Forms.Timer Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Timer1 = New System.Windows.Forms.Timer Timer1.Interval = 1000 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e … | |
Re: Hi emko. Try this: Give your SalesRange array form scope: At the top type: [CODE]Public Class Form1 Private SalesRange As Integer() = {0, 0, 0, 0, 0, 0, 0, 0, 0}[/CODE] And delete this from your btnCalculate_click sub. [CODE]Dim SalesRange As Integer() = {0, 0, 0, 0, 0, 0, 0, … | |
Re: hi chibex64 If you look at Momerath's example, there are single quotes around each phone number - '111-222-3333', '222-333-4444'. Your sql statement built by this line [CODE]"SELECT Name, Mobile FROM PHC_Contacts WHERE Mobile In '" + ListBox1.Items.ToString + "'", [/CODE] will enclose the whole list in quotes. To be honest, … | |
Re: Hi chris, Isn't sqlReader.Item(20) attempting to get the value of the 21st column when only 2 columns are returned? Try getting the value of your first column (EmployeeID) with sqlReader.item(0) and your second column (MTD_Value) with sqlReader.item(1). Alternatively use sqlReader.GetString(0) and sqlReader.GetFloat(1) | |
Re: Hi eladreznik I think you may find it easier to change a few settings in design view - that is, select the grid in the designer and make these changes in the properties window: 1) set AllowUserToAddRows to False. 2) set MultiSelect to false. 3) If you want, set SelectionMode … | |
Re: Hi Skillzilog. When you say it isn't working, do you mean you are getting some kind of error, or are your queries just not returning the records you think they should? (btw Is CUstomer_ID a numeric field? If so, you cannot use LIKE without first converting it into a string- … | |
Re: hi uzn. Try inserting this line: [CODE]objCommand.Parameters.Add(objParam1)[/CODE] | |
Re: Hi dorothy If pincode is a numeric field in your database then you should probably use [CODE]strSQL = " SELECT * FROM ATM WHERE pincode = " & pinenter.Text [/CODE] If it is a text field, then use [CODE]strSQL = " SELECT * FROM ATM WHERE pincode = '" & … | |
Re: Hi 12345pj I've been using SKype4Com for the best part of year now without much problem - but only on 32 bit. There is definitely nothing wrong with your code. I think the real problem lies in successfully installing Skype4com - or any com component - for 64 bit, and … | |
Re: Hi aram25 To rename a file, use the fileinfo.move method. Something like this: [CODE]Private Sub RenameFile(ByVal Path As String, ByVal NewName As String) Dim fInfo As FileInfo = Nothing Try fInfo = New FileInfo(Path) Try fInfo.MoveTo(fInfo.DirectoryName & NewName) Catch ex As Exception MsgBox(ex.Message) End Try Catch ex As Exception MsgBox(ex.Message) … | |
Re: Hi styopah, your syntax looks fine. Just a bit puzzled as to the values you are trying to insert. Should look more like this: [CODE]sCmdIns = "INSERT INTO Table1 ([Date], Arrive, Depart, Lunch, LunchTime) VALUES (#01/01/11#, #09:00:00#, #17:30:00#, 'Chicken', 12)"[/CODE] | |
Re: Hi evankean Think PerplexedB is right. Your [P&L] field is probably some kind of a numeric field (Integer prob) If you want [P&L]=48A to work, you must change the field in the Access database to a text field. Then Perplexed' suggestion will work i.e. including the single quotes like this: … | |
Re: [CODE]Private Function AlternateCase(ByVal Input As String) As String Dim sResult As String = "" Dim sChar As String = "" Dim i As Integer Dim capital As Boolean = True For i = 0 To Input.Length - 1 capital = Not capital sChar = Input.Substring(i, 1) If capital Then sResult … | |
Re: Hi Emver - something like this: [CODE] Dim UserGuess As Integer Dim Turns As Integer Const MAX_TURNS As Integer = 10 Dim TurnsExceeded As Boolean = False Console.Clear() RandNum = RandomGenerator.Next(1, 10) Console.WriteLine("{0}", RandNum) Console.SetCursorPosition(20, 12) Console.Write("Enter Your Guess :") UserGuess = Console.ReadLine() While UserGuess <> RandNum Turns += 1 … | |
Re: Hi Mariandi. I've recently had similar issues painting over a form with a gradient fill background. I found this link very helpful: [url]http://www.bobpowell.net/doublebuffer.htm[/url]. I think the trick is often to stop forms and controls painting when you don't want them to. Perhaps create you own picturebox that only paints when … | |
Re: Hi lanitooot. Locate the code: [CODE]MessageBox.Show("Record is Successfully save")[/CODE] Move it from line 179 to line 187 THink it should go after the attempt to ExecuteNonQuery not before. You may find you no longer receive the message telling you have successfully saved your record. Do you receive an error message? … | |
Re: Hi Swaroop, this may be partly down to a serious problem with the datetimepicker - it only binds properly to non-null values. In other words, it doesn't work. It displays incorrect values. If this is part of the problem you may have to consider a nullabledatetimepicker control as an alternative … | |
Re: [QUOTE=RajendraR;1301844] i'm not able to copy text from combobox1 on dialog1 to textbox1 which is on form1[/QUOTE] Hi Rajendra, you haven't said what happens when you try. Do you get an exception? Looks like your dialog1 form has a problem: [CODE] Form1.TextBox1.Text = Me.ComboBox1.Text[/CODE] Have you instantiated Form1? Do you … | |
Re: Hi Tweed. Difficult to give a decent answer without knowing more about you objects, but in rough pseudoish code, maybe this will help: [CODE]Dim column as integer = 0 Dim row as integer =0 Dim obj as myObject For column = 1 to myObjectsCollection.Count myObject = myObjectCollection(Column) For row = … | |
Re: If this is a date field, try # instead of ' [CODE]cmd1 = New OleDbCommand("Update tblParking SET status = 'Available' Where exp_date <=#" & Date.Today & "#", cn)[/CODE] | |
Re: try this select * from Stock where (CDate(Int(Timing))) = #23/07/2010# | |
Re: [QUOTE=kmh72756;1291539]Nobody else has any input to offer?[/QUOTE] Hi kmh. If making cell invisible means making it invisible to all intents and purposes, then you might consider using a DatagridViewCellstyle to mimic invisibility, something like code below: button1 creates dummy grid button2 makes a cell pseudo invisible based on a condition … | |
Re: Hi Andrew. Use % instead of * for your wildcard [code] "SELECT * FROM marketingDB WHERE company_name LIKE 'allied' & '%' " [/code] Or maybe better without so many single quotes: [code] "SELECT * FROM marketingDB WHERE company_name LIKE 'allied%' " [/code] THe problem is a known irritation regarding oledb, … | |
Re: Hi alsnchns How about putting this at the end: [CODE] try daAdapt.Update(ds) catch... [/CODE] |
The End.