4,901 Posted Topics

Member Avatar for pipelian

[code] Dim prod As String = "P011112" Dim mm As Integer = CInt(prod.Substring(1, 2)) Dim yy As Integer = CInt(prod.Substring(3, 2)) MsgBox(MonthName(mm, False) & ", " & yy + 2003) 'output is "January, 2014" [/code] Assumes that the digits in the string are valid for conversion to date.

Member Avatar for pipelian
0
322
Member Avatar for ryklon

Try this [code] Private fadeout As Boolean . . . Private Sub btnFadeOut_Click(sender As System.Object, e As System.EventArgs) Handles btnFadeOut.Click fadeout = True Timer3.Enabled = True End Sub Private Sub btnFadeIn_Click(sender As System.Object, e As System.EventArgs) Handles btnFadeIn.Click fadeout = False Timer3.Enabled = True End Sub Private Sub Timer3_Tick(sender As …

Member Avatar for ryklon
0
1K
Member Avatar for HardWorker2

I need to know the structure of the tables, the relationship between them, and the names of the fields you want to update.

Member Avatar for HardWorker2
0
267
Member Avatar for markdean.expres

You might check out [url]http://glassocean.net/perrys-id3-tag-library/[/url] Available as binary and source

Member Avatar for Reverend Jim
0
240
Member Avatar for Quinncunx

When you ask a question like that you are going to get as many different opinions as you have people responding. Everyone has their own style of coding and even that style can evolve. See [URL="http://notinventedhe.re/on/2010-4-20"]Not Invented Here[/URL] for an example. Please keep in mind that the following reflects my …

Member Avatar for jlego
0
240
Member Avatar for aishapot

The query syntax to insert a picture into SQL can be found [URL="http://www.daniweb.com/software-development/vbnet/threads/411671/1756549#post1756549"]here[/URL]

Member Avatar for aishapot
0
962
Member Avatar for Quinncunx

As I understand it, modules are where you put general purpose code that you may want to reuse in another app. You would not put code in a module if it references forms, variables, controls, etc that exist outside the module unless those references are passed as parameters. For example, …

Member Avatar for Reverend Jim
0
229
Member Avatar for vivekanandaan

Your statement sql = "insert into mr_detail select job_Code,mr_no,item_code,qty,addl_description" would be complete except you have failed to name the table you are selecting from. For example, if I have two tables containg names, I can do the following insert into table2 (lname,fname) select last_name,first_name from table1 where last_name like 'Jo%' …

Member Avatar for M.Waqas Aslam
0
138
Member Avatar for sushanttade

Try this and see what happens. Copy the following code and save it into a file with the extension "vbs". Replace the username and password values with whatever strings you expect to find in tour admin table. Then run it from the command line like cscript somename.vbs If you are …

Member Avatar for Reverend Jim
0
218
Member Avatar for haqayyum

to add the leading zeroes you can pad the number out by nextid.ToString("0000") once you have maxid. You can generate the next id in the select by select max(ID)+1 as nextid from tblID

Member Avatar for Reverend Jim
0
2K
Member Avatar for vivekanandaan

Let's take two tables with the same structure. Two fields, last_name and first_name where both are varchar(50). To select some data from table 1 and insert it into table 2 you can do insert into Table2 select * from Table1 where last_name = 'Jones' If the tables have similar fields …

Member Avatar for Reverend Jim
0
161
Member Avatar for rhone0809

I can't open your document. Don't assume everyone has Office 2010. Posting in txt format would be preferable.

Member Avatar for rhone0809
0
456
Member Avatar for Jackwong0099

First of all, never use blanks in the name of a field. You should use "Date_of_Birth" rather than "Date of Birth". Secondly, you are retrieving three different fields (chodob1, chodob2 and chodob3) and giving them the same alias (Date Of Birth). Same problem with "Date Of Departure". Fix that and …

Member Avatar for Reverend Jim
0
115
Member Avatar for ng5

Go to the project Properties, then click on "Settings" down the left side. Add as many string variables as you have text boxes to save. For example, if you add the string setting, MyText1 you can load the textbox on form load as TextBox1.Text = My.Settings.MyText1 and save the value …

Member Avatar for codeorder
0
434
Member Avatar for razree

First, some pseudo code to get the logic. [code] 'find the most recently modified log file containing a given string mystring = "ERROR" newestfile = "" newestdate = someolddate for each file in the folder if this is a log file if the file contains mystring if this file is …

Member Avatar for Reverend Jim
0
238
Member Avatar for dilse4sk

There are a couple of approaches. What I did at work depended on the application(s). If an application needed access to just one database then I would create two accounts in SQL server named APP_RO and APP_RW, where "APP" was replaced with the application name, and RO and RW denoted …

Member Avatar for Reverend Jim
0
501
Member Avatar for collin_ola

One way to do it would be [code] Dim lines() As String = TextBox1.Lines lines(3) = "this is actually line 4" TextBox1.Text = Join(lines, vbCrLf) [/code] Of course, you would get an error if you didn't have enough existing lines. n alternative would be to use a listbox instead and …

Member Avatar for collin_ola
0
2K
Member Avatar for artemix22

Can't speak to MYSQL but in SQL Server you insert the file directly as [code] insert into Pictures (name,picture) Values ('first pic',(select * from openrowset(bulk 'd:\temp\testpic.jpg',single_blob) as picture)) [/code] In this case my table is named Pictures and is defined as name=VARCHAR(50) and picture=VARBINARY(MAX) The last parameter in the above …

Member Avatar for Reverend Jim
0
433
Member Avatar for ryklon

If your source code is available to read, I suspect no. String constants in exe files can be easily extracted so if you want to "hide" the password in the exe then you can build it at run time a character or two at a time, even using conversion from …

Member Avatar for Reverend Jim
0
284
Member Avatar for ibeast

You could create an array of TextBox references and populate it as you create the controls as in [code] Public Class Form1 Private MyText(3) As TextBox Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 3 Dim box As New TextBox box.Location …

Member Avatar for ibeast
0
1K
Member Avatar for birdlover2010

use the SelectedItem property of the combobox to get the value. The selected item is available in the event, ComboBox1.SelectedIndexChanged. If you know that the selected item is integer you can convert it as dim mynum as Integer = CInt(combobox1.SelectedItem)

Member Avatar for codeorder
0
929
Member Avatar for atticusr5

Go ahead and post the code. It would also help to see the structure of the table. How you set the value of a local boolean for isAdmin will depend on the field type. For example, if isAdmin is a single character field containing "Y" or "N" (and assuming you …

Member Avatar for Reverend Jim
0
158
Member Avatar for princenathan

Is this a sample of code that works or is it a piece of code that you are having a problem with? If it is the first then you should explain what it does and how. If it is the second then you should explain what you are trying to …

Member Avatar for Reverend Jim
-1
1K
Member Avatar for Reverend Jim

Could someone please undo the negative vote I made on [url]http://www.daniweb.com/software-development/vbnet/threads/411073[/url] I didn't intend to ding the OP and I can't see any way of undoing it myself.

Member Avatar for deceptikon
0
106
Member Avatar for Sevyt
Member Avatar for vammy

Try 1000*((6511+500)\1000) With a little playing around you should be able to roll your own Round function to round to an arbitrary digit.

Member Avatar for Reverend Jim
0
442
Member Avatar for Rock_IT

You start by reading books. "Wrox Professional Visual Basic" and "Sybex Mastering Visual Basic" both contain very good sections on database programming. Don't expect us to be personal tutors and hold your hand through the learning process.

Member Avatar for princenathan
0
223
Member Avatar for Kalle21
Member Avatar for gelpena

You didn't attach anything that I can see. Can you please explain the problem a little more clearly? [QUOTE]search dates on Sheet1 and copy the name associated with that name[/QUOTE] Are the dates in specific rows and/or columns? What do you mean by "name associated with that name? If you …

Member Avatar for Reverend Jim
0
210
Member Avatar for BlackStar0703

I wrote something like that quite a while back and I used an 3x3x3x3 array of textboxes. By picking various combinations of indexes I was able to check for duplicates in any of the required directions. If you are interested, there is a very good book by Wei-Meng Lee (Apress …

Member Avatar for Reverend Jim
0
697
Member Avatar for sigridish

By default when you create a new Excel WorkBook it has three WorkSheets. You can refer to them as [CODE] sheet = xls.ActiveWorkbook.WorkSheet(1) 'or (2) or (3) [/CODE]

Member Avatar for sigridish
0
680
Member Avatar for clow1
Member Avatar for Reverend Jim
0
40
Member Avatar for Computersaurus

Computer stores generally have an image for each flavour of computer and OS. When one of their computers comes back into the shop, all the tech has to do is select the disk that matches that computer/OS and do a restore of the image. All the tech has to do …

Member Avatar for Reverend Jim
0
322
Member Avatar for sw8revenge

What do you need help with? At the highest level you have [code] retrieve user info from database display on form [/code] How much detail do you need? What have you done so far? Is your problem defining the database, populating the database, retrieving from the database, writing to another …

Member Avatar for Reverend Jim
0
88
Member Avatar for m4_prashanth
Member Avatar for thedonedeal
Member Avatar for jbutardo

There are numerous examples in this forum of how to get at data (read and write) in cells in Excel spreadsheets. If you can be bothered to do a search you should be able to find them. That's what the big, obvious Search Box at the top right of this …

Member Avatar for jbutardo
-1
149
Member Avatar for slbreaul

"Split" takes a string and splits it into multiple strings so the result has to go into a string array as follows dim splitNumbers() as String = txtCompute.Text.Split(" ")

Member Avatar for Reverend Jim
0
148
Member Avatar for shibuvarghese

You can replace a single quote with two single quotes before you add the string to the query. For example [code] insert into table1 (name) values('D''Costa') [/code] If you need to search for fields that contain characters like '%' and '_' you can use the ESCAPE keyword as follows: [code] …

Member Avatar for Reverend Jim
0
2K
Member Avatar for honeybee2090
Member Avatar for honeybee2090
0
87
Member Avatar for Alex_2011

[QUOTE]I wrote a code that stores three names[QUOTE} Your code actually stores 4 names. [QUOTE] - Make the user select a number (from 1-3) by using a (combobox) - If the user select the proper number then a message will appear that the name is there. [/QUOTE] How do you …

Member Avatar for Alex_2011
0
330
Member Avatar for sharathg.satya

If pressed, I would say number 4. Counters are incremented by fixed amounts. The increment in number 4 varies depending on the current value of counter. Technically, number 4 could be a counter if (for example) in a loop, the number of things you are counting doubles each time. Then …

Member Avatar for sharathg.satya
0
90
Member Avatar for Gobble45

I would create an array of denominations ordered from largest to smallest. Then I would create a while loop that runs while the balance (cash - cost) is greater than zero. An inner loop would select denominations from largest to smallest and determine how many multiples of each could be …

Member Avatar for Reverend Jim
0
150
Member Avatar for vivekanandaan

I don't know if COALESCE is available under Access (but it is under SQL). It takes a variable number of arguments and returns the first value that is non NULL. If you call it like COALESCE(MAX(Column),0) it may give you what you want (again, assuming it is supported under Access).

Member Avatar for Reverend Jim
0
722
Member Avatar for Reverend Jim

Could somebody please put a sticky post like [URL="http://www.daniweb.com/software-development/python/threads/366794"]this[/URL] at the top of the VB.NET forum? It's gotten to the point where people are now posting blocks of uncommented code and no actual question. It might help if the first thing at the top of the page was [B][COLOR="Red"]"Read This …

Member Avatar for WaltP
0
168
Member Avatar for adhani85

As a rule it is considered prudent to provide more than just a block of uncommented code and no actual explanation or question. What is the code supposed to do? How does this differ from what the code actually does? Are you getting any errors? What does your input look …

Member Avatar for thines01
-2
171
Member Avatar for jbutardo

I'm not sure what you mean by validate the file size. You can get the file size by [code] My.Computer.FileSystem.GetFileInfo(filename).Length [/code] Typically you would validate it by uploading it then comparing the size of the uploaded file to the size of the local file but you say you want to …

Member Avatar for jbutardo
0
567
Member Avatar for bilal_fazlani

You could use an Access database or an Excel spreadsheet. There are connection strings available for both of these. Even CSV files as I recall.

Member Avatar for bilal_fazlani
0
180
Member Avatar for Ghoztrider

The process I would use is as follows: [code] create an Excel application object create a workbook select the first worksheet set row index to first row for each selected csv file set column index to first column for each line in this file for each field in this line …

Member Avatar for Ghoztrider
0
2K
Member Avatar for bhavan kamble

First thing I would check is whether the query string on line 51 actually contains the query to delete the record you want. For example, if b doesn't have the value you expect then the query won't delete what you want. As for why the record is not being deleted …

Member Avatar for Reverend Jim
0
1K

The End.