Is there a way or a tool that can automatically correct some common errors like "Cannot implicitly convert type 'System.DateTime?' to 'System.DateTime'. An explicit conversion exists (are you missing a cast?)"?I would want it to be able to automatically add (DateTime) to the offending line instead of going all over them manually. Is this possib
When I was learning QBasic I found a list of most common errors and it told me whether my errors were syntax errors or logic errors. Where I can find a similar list for VB 2008 Express Edition?
I'm currently using VS2008 and VB.NET.When I attempt to populate a Queue that has not been instantiated with objects, the program simply hangs without throwing an error.I have run into this issue multiple times in different parts of the program in the past few days.What could be the cause of this?
Here's the code: Structure ConsoleBufferLine Public EntryDate As Date
I have created a basic query generator which allows a user to select the Select, WHERE and criteria attributes using a number of checkboxes.However i have got stuck. In the results form i have the following code
The program keeps on crashing if the user does not select the corresponding amount of display records from above for the amount of attributes they want for the SELECT part of the query in the intreface in form 1.
How would i go about making something where the number of SELECT attributes selected which are listed in a string create the correct number of textbox fields in the results form (form2)
Is there a setting that will allow C# to auto correct it's casing similar to VB.NET. For example when I type dim x as integer in VB.NET, it automatically converts it to Dim x As Integer, but c# does not do this type of stuff.
I am having some trouble getting the correct syntax for a bit if code. I am using vb to insert data into a db and outputting the data as XML, here is the code
<WebMethod()> _ Public Function addTrack(ByVal tTitle As String, ByVal tAlbum As String, ByVal tGenre As String) As String Dim conn As New SqlConnection("Data Source=MARTIN-LAPTOPSQLEXPRESS;Initial Catalog=mp3_playlists;Integrated Security=True") Dim sql As String = "INSERT INTO Tracks (trackTitle, trackAlbum, trackGenre) VALUES ('" & tTitle & "', '" & tAlbum & "', '" & tGenre & "') FOR XML AUTO, ELEMENTS"
[code]....
The code is for a ASP.NET web service, when I click invoke on the website i get the error Incorrect syntax near the keyword 'FOR'. If I remove FOR XML AUTO, ELEMENTS everything works find, db updates but I dont get the data to output as XML. I think the issue is with the brackets required for the insert values because this issue does not occur if the SQL statement is a SELECT statement which has no brackets but i just cant figure out the correct syntax?
I happen to have these common procedures which I want to be used in my forms and usercontrols, with the form I can put those procedures in the base form which is being inherited but I happen to have a need to use those same procedures in my usercontrols, is there a way that I can have a common base class that I can use both for my form and usercontrol? I haven't used yet a base usercontrol since my usercontrols will not look the same so I have to put those procedures in each one of them and I find it rather cumbersome.
I have a login form. all my code is valid with the database and all that.i use an if statement, like if passoword and username match database password and user name then it allows them in then opens my main form. code for that is as follows
[code]...
for some reason, it shows the correct messageboxes and correctly validates all through database, but it closes the Login form correctly, but then shows the main form only for a second, then closes program. I am having issues with similar form opening and closing in other parts of the project as well.
I have a user that is receiving the following error: "Input string was not in the correct format"So I looked into the code and I can see why he is getting the error. The code is trying to execute this line:
_MyObject.LineBreaks = "0"
And the property looks like this:
Public Property LineBreaks() As Integer Get Return _MyLineBreaks
[code]....
Now, I immediately see that this old code is trying to set a string into an Integer and the old programmer was not using Option Strict, so he didn't notice this, BUT the problem has only happened one 1 user's PC. Running from the IDE works fine as well as installing the application other PCs. The code is executed every time the application runs, but yet only one person has reported the issue.Why would one PC baulk at this, but not the VS IDE or any other PC so far? Is there some system setting that determines how type conversion is handled? I need to get this user up and running.
I finish to makethe forms and the code of my project, but when I try to make the executable file it shows errors about some forms that I created as test but I deleted so I wonder where I need to go to take them out and try to build again my executable smoothly?Example: Unable to open module file :'C:....CrystalReport2.vb': The system cannot find the file specifiedNote: That CrystalReport file was eliminated because I didn't need it.
When we are saving into a txt file the error details there is still a possibility that we will encounter some exception, how should we handle such cases?
I want to display the correct records in my SectionName dropdown list whenever the user select/check an radio button (Elem or HS). No radio button is checked during design time but when I run the app, the SectionName dropdown list show Elem records. also when I checked the HS radio button the SectionName dropdown list records does not changed at all..
Private Sub frmLoading_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If cnn.State = ConnectionState.Closed Then cnn.Open()
I am trying to connect to SQL Server Express locally using VB.NET 2005. I pulled my connection string directly from the app.config file. When I run, I get NO errors and the connection states returns open, however the commands are not being processed.
Imports System.Data Imports System.Data.SqlClient Public Class frmAddMovie
I have a ComboBox on my form and I am trying to create a SuggestAppend for AutoComplete as the end user types. However, I am getting an ArgumentOutOfRangeException when I press the first letter. Then System.Data.DataRowView automatically populates the ComboBox. [Code]
I have been asked if its possible for an application that sits on a network folder for multiple users and check online to see if there is a newer version. If there is prompt the user to download it and load the new version.
i have a text box on form with name "S.No", i want to give auto incremented entry to this textbox, i mean that if i give 1 and when i press the submit button so the entry become change to 2, then 3 and so on. and when i reopen the same form some other time so the entry continues from where it ended last time? how would i do this?
I want to implement the auto recovery feature in my application. i.e auto recovery of data from power failure ,system crash,etc.Since the program is an multiuser with different access levels to each user, I want to save the data in a file which can only be recognized by the program.
I have been searching for a while and not able to find anything useful on how to approach this issue.I have a ComboBox on a form and what I am looking to do is when the ComboBox has the cursor focus, it automatically opens up and displays the options. Just as if you clicked on the ComboBox. I was considering PerformClick but the only problem is, I believe PerformClick is only available for the Button and no other control.
I have a datagridview that contains a long piclist. The requirement from the user is that they want to be able to type the first few numbers of an item in the list and have the grid automatically scroll to the appropriate spot in the list.I was hoping to find a property on the dgv for it, but haven't found anything yet.
Currently i write data to a listview, when the user has finished it is written out to excel.I would like to include a auto save that will have a option to set the auto save time frequency. (10min, 20 mins, etc)I tried auto saving to excel but it freezes the app whilst doing this.What would be my best alternative to auto save the data and reload it back into the listview so it can be written to excel.
I have a .net application that uses customerrors web.config module to display meaningful messages for errors. It works without any issues for 500 errors/exceptions caused by non-ajax and ajax components (updatepanel). However, in a scenario where updatepanel's asynchronous request times out, there is no error raised at all. I was able to see the timeout in firebug and come up with a solution that would at least display the error message as an alert and then redirect the user to the 500 error page using javascript but it's not quite doing what the rest of the application does in case of an unhandled errors like these. I basically just want everything to go through "LogEvent" mechanism so based on the severity of the error, it does the necessary work.This 500 error page doesn't have anything in the Server.GetLastError() for these timeout scenarios. Is this an expected behaviour? Can it be changed so I do have access to these timeouts in Server.GetLastError() OR maybe just run this error through "LogEvent" mechanism? Is there a better/more graceful way to handle this issue?
Below is my code to give you an idea, not exactly what I have in my application but pretty close.
I have a Table with an integer ID number set to auto-increase. Does anyone know how to let SQL server fill the gap (where rows are deleted) when new rows are added? If can, how to get the scalar ID number assigned?
I saw lots of things online that look like you can't create a number that increments with every build automatically - rather you have to set it in AssemblyInfo.vb - is that really the case??
I've been using some recommended code from successfully for a couple of years now to auto-increment the build number in my project.
[URL]
But I just updated my workstation from XP Pro x86 to Vista Ultimate x64 and now it isn't working any more. Everything else works, but not this. It increments the build number when I build the application, but then VS gives the following error:Error 4 Unable to apply this change while debugging. File 'D:My ProjectAssemblyInfo.vb' was reloaded. You must revert the change or stop the debugging session.So essentially I can't do anything in my application, or at least I can't run in debug mode because of the error.
Suppose if the user selects an image which is bigger than the size of the button, then i want it to autosize the image so that it fits the button I am providing an OpenFileDialog to the user to select the image for the button
My idea is when I paste (ctrl+v) for example this number : 4111111111111111
it would automatically paste them in textboxes one by one in order!
so txtBox1 will contain : 4111 txtBox2 : 1111 txtBox3 : 1111 txtBox4 : 1111
the automation of inserting credit card's number will ease so much so that user will not work so hard to cut & paste each four digits!so any suggestion of doing auto-fill inside textboxes..?
2)if I am already in txtBox4 and want to delete back with the key "BackSpace/Return" after deleting txtBox4's content and clicking one more time the "RETURN' key it would move to txtBox3 and so on until cursor gets to txtBox1...
I have a project which has a table with a list of stores. Originally the store code was a string of 3 and was padded so 1 would be 001 etc. I have had to increase this column to 8. The problem is when I read in data from a XML file the store code is padded so it looks like this '500 ' rather than '500'. This is now causing a major problem when I do a comparison.Is there a way to it does not auto pad to the full string length?