4,922 Posted Topics
Re: If you want to prevent edits by other users then three possibilities are: 1. separate database for each user with a common database for login info 1. separate tables for each user with a common login table 1. all tables contain a field identifying the user Option 1 is probably … | |
Re: Why does the data have to be copied manually from Excel to the RMS? Who not just write a script or app to do this? And if it has to be done manually, why put it in Excel in the first place? | |
Re: Since you already know how to read and write from/to the database I assume you are wondering how to preserve the number last used by the app. Before I offer a suggestion, what version of VB are you using? Newer versions of VB use My.Computer.Settings to save settings between sessions … | |
Re: I think you'll have to sort the data from within a VB data structure unless you write a SQL stored procedure to do the query. Any sorting of the records as strings (varchar) will put records (for example) starting with "23" after "2" and before "3" which is not what … | |
Re: It would help to know the specific error. Perhaps a simple example that I have tested locally. I have a table named "users" defined as UserID int UserName varchar(50) UserType varchar(50) and a text file (bulk.txt) that contains (tab delimited) 1 Jim user 2 George admin 3 Fred admin 4 … | |
How does the search feature on Daniweb work? I have had to recreate (several times) a posting to point people at the Microsoft article on how to deploy an application. I'm sure I have used 1. the actual article name 1. the word "walkthrough" 1. the word "deploy" and each … | |
Re: There is a seldom used (I hope) technique called "the self modifying program" that, like a GOTO, when used properly can be very convenient. Here is an example of such a program written in vbScript FILELOC = "" FILENAM = "" 'keep the above two lines as the first two … | |
Re: You can't just copy the exe file to another computer and run it. You have to create an installer, then run it on the target computer so that all of the required components are also made available. Microsoft has a walkthrough on how to deploy a windows applicatiion [here](http://msdn.microsoft.com/en-us/library/k3bb4tfd%28v=vs.80%29.aspx). There … | |
Re: When I consider the ratio of the number of threads that I have started to the total number of postings I have made, the "inconvenience" of having to ignore the social media requestor is insignificant compared to the benefit to the site as a whole. I don't mind the added … | |
Re: I don't know what the target system is but it sounds like an access rights problem. It could be that the folder containing the database is restricted to read only. Or it's possible that the database file itself has insufficient access rights. You could try taking ownership of the file … | |
Re: Why don't you access the embedded control by qualifying it? For example, if your user control is named myControl and your embedded ToolStrip is declared as Public myToolStrip As New ToolStrip then you can access the ToolStrip as myControl.myToolStrip If you need to access it more directly then you can … | |
Re: This might be a little shorter and clearer Dim aa As New Collection Dim bb As New Collection For Each user As String In {"Abe", "Bob", "Jim"} Select Case UCase(user.Substring(0, 1)) Case "A" : aa.Add(user) Case "B" : bb.Add(user) End Select Next But a more general approach using a dictionary … | |
Re: See the latest infoworld review, [Windows 8 review: Yes, it's that bad](http://www.infoworld.com/print/200113) | |
I am configuring two laptops for family members. I have been doing this for so many years (work and home) that perhaps I do it a certain way more out of inertia than any other reason. I'm going to describe my config system and if anyone has any opinions (for … | |
Re: So the short version is If 0 <= a <= 100 Then is equivalent to If (0 <= a) <= 100 Then which is NOT the same as If 0 <= a And a <= 199 Then | |
![]() | Re: You should determine whether this is a perceived (by you) slight or an actual slight. If it is actual then you should ask yourself if it was dererved. Was it caused by a specific act or series of acts on your part? Was the person who slighted you the target … |
Re: If all the entries consist of "N" followed by a number you could get the numeric portion by CDbl(txtNumber.Text.Substring(1)) | |
Re: Dates are not stored as string so you can't check for "Ma" or any other part of a month. You would have to use the DATEPART function to extract the mont number and comare it to 3 (for March). For example (and I may not have the exact syntax right … | |
Re: Are the fields in the database in the same order as specified in the insert? The usual format of an insert is to name the fields that correspond to the parameters as in addusr.CommandText = "INSERT INTO dbo.Users (username,password,access) " & _ "VALUES('" & user & "','" & pass & … | |
Was there a problem with DaniWeb last night and this morning? All I got when I clicked on an email link, or tried to access the site directly was a blank page. I was getting email notifications. I just couldn't view any pages. | |
Re: Do you already have data in the table? Is the column of type int? | |
Re: I'll take a shot in the dark and say that your code doesn't work for one of two reasons: 1. It has a syntax error 1. It has a logic error | |
![]() | Re: I have to disagree with mike about University, however, I graduated in the late 70s and I know that Computer Science has changed dramatically since then so I can only speak for myself in the dark ages. The skills I acquired in University were absolutely invaluable in developing my skills … |
Re: Read [this](http://www.daniweb.com/software-development/vbnet/threads/424836/read-this-before-posting) | |
Re: You could also replace If tabC.TabCount =1 Then EnableDisableMyControls(TRUE) Else EnableDisableMyControls(FALSE) End if with EnableDisableMyControls(tabC.Tabcount = 1) | |
Re: You connect to the database. You query the database for the record containing that data. If the number of records returned is zero then it isn't in the database. For a more detailed answer we need more detailed information. | |
Re: Move the CaptureImage and PreviewImage lines of code into the timer routine so that the picture gets taken when the timer gets to zero as in Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick lblCountdown.Text = timercount.ToString() If timercount = 0 Then Timer1.Enabled = False CaptureImage() … | |
Re: That's because you are only affecting one PictureBox in the timer. If you have multiple pictureboxes you could either generate a random number and use that in a Select Case to pick a random image, or you could create an array of references to the pictureboxes and use the random … | |
Re: Please read [this](http://www.daniweb.com/software-development/vbnet/threads/424836/read-this-before-posting) then try again. | |
Re: I don't know what method you are using to interface to the database but it could be done like Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim lbx As ListBox = sender Dim con As New SqlConnection Dim cmd As New SqlCommand Dim rdr As SqlDataReader Dim … | |
Re: How is the data getting into the DataGridView? Where does the data come from? | |
![]() | Re: @Unhnd_Exception - You already posted the comment > I'm tired of seeing this. Glad everyone else likes it. If you have more to add you can always send me a PM although based on your comment I would have thought you'd just ignore the thread entirely. I hope any comments … |
Re: Asked and answered [here](http://www.daniweb.com/software-development/vbnet/threads/432284/combine-multiple-text-file-into-one-csv-file) | |
Re: You just have to set the tooltip text on the mouse enter event for that control. If you set it to a null string then no tooltip is shown. Try the following: Private Sub RichTextBox1_MouseEnter(sender As System.Object, e As System.EventArgs) Handles RichTextBox1.MouseEnter Dim ctrl As RichTextBox = sender If My.Computer.Keyboard.CapsLock … | |
Re: > I have a "sickness" which makes my memory less durable to such readings. Since this is a text based forum you are going to have a problem. I suggest you give this free [Video Based Tutorial](http://channel9.msdn.com/Series/Visual-Basic-Development-for-Absolute-Beginners) a look. | |
I'm using FireFox 15.0. I tried to attach a zipped file to a post and DaniWeb won't let me. It works in IE 9 though. I've attached three pics. First is before clicking "Files". Second is after clicking "Files" (scrolling is not mine). Third is after clicking "Files" and scrolling … | |
Re: What do you mean by "from any location"? | |
Re: Before you use the database you have to attach it. You can use the following command sp_attach_db 'dbname','datafilename','logfilename' If your database and log files are named D:\SQL\DATA\mydb.mdf and D:\SQL\LOG\mydb_log.ldf then your command looks like sp_attach_db 'mydb','D:\SQL\DATA\mydb.mdf','D:\SQL\LOG\mydb_log.ldf' You might want to truncate the log file before you move it off your … | |
Re: Yes, but you have to redirect the stdin and stdout (and stderr). I've attached a sample VB 2010 project that shows how to do it. | |
Re: You have to convert it to a number before you use it in the calculation. Typically, this is done by first checking to see if the string CAN be converted to a number as in If IsNumeric(APSDPS.Text) Then APSDPS3.text = (CDbl(APSDPS.Text) * (1.0 + 15.0/100.0)).ToString | |
Re: I especially liked >Software developers tend to be software addicts who think their job is to write code. But it's not. Their job is to solve problems. | |
Re: My degree was in Computer Science. I don't know what topics get covered in Information Technology these days but I was amazed at how much the curriculum had changed from when I got my degree in 1977 and when my younger son graduated from the same University in 2009. There … | |
Re: If ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then ListBox1.SelectedIndex = 0 Else ListBox1.SelectedIndex += 1 End If | |
Re: You might (I have no idea if it is possible) be able to determine if there are other FileSystemWatcher type tasks running, but this is not the only method used to watch files/folders. Some watchers use periodic polling to watch files. There is no way to detect if another program … | |
Re: What database are you using? MS SQL, Oracle, mySQL, Access, etc? | |
Re: There is a way to enable Transparent color in a control but it has to be done in the Constructor (New). You don't have access to the constructor for the built in controls but you can subclass any control and add Me.SetStyle(ControlStyles.SupportsTransparentBackColor,True) to the constructor for that control. However, I … | |
Re: This is difficult to do with a ListView control, however it is trivial with a DataGridView which has CellMouseEnter and CellMouseLeave events. You could scan all SubItems in each row of the listview and use the Bounds.Contains method to determine if the current mouse coordinates lie within a cell but … | |
Re: How do you define when you are finished your input? Event based programming relies on triggers to do anything. In your case the trigger is end-of-input. But you have to define what that is. | |
Re: Please start a new thread with your question. This thread has been dead for a year, has been marked as solved, and your question does not apply to the original question. | |
Re: You don't want to use a timer for this. Instead, you should modify the contents of the second combobox when the user picks a new selection from the first combobox. Also, instead of hardcoding separate Adds for each selection, store the contents in a dictionary. That way the code doesn't … |
The End.