200 Posted Topics
Re: Lots of different ways you can do the import but automatting Excel is probably the last one I would pick. First if you are importing directly from an Excel file, there is no reason to automate Excel at all. Using OLEDB you can read the values straight from the file … | |
Re: Is this being run on a different computer then what it was created? Reference problems like this are usually a case of having a different version of Excel (or no version) then which it was created on. With that said, it seems you are simply listing file directories into excel. … | |
![]() | Re: None of the parameters even have datatypes defined.... An overflow error is usually caused by trying to force a bad value that doesnt fit into a specific datatype. ![]() |
Re: Public Subs/Functions are best off put into a module file so that all forms within a project can access these methods. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]MSDN Data Walkthroughs[/URL] | |
Re: Seem to be that it is expecting you to pass an integer value in the c.GetDisplayText function but instead you are passing a tab string. Of course im only taking a guess here since I dont know what your function parameters are... | |
Re: Database's hold a DateTime value so its important to include the time such as using a between Todays date at 12:00am and tomorrows date | |
Re: You have to point the datagridview's datasource property to the table you are storing the results DataGridView1.DataSource = myDataset.Tables("myTable") As to the pictures, this can be done but is not recommended. It is much better to store the files path to a database and use that path to load the … | |
Re: Can you show your insert statement from the stored procedure? Without seeing it, I'm guessing either the parameters are wrong, missing or misspelled. Also assuming that DesignationID is an numeric field I would suggest converting the textbox value to a numeric datatype (CInt(TxtDesigCode.Text)) Lastly there is no need of assigning … | |
Re: You need to take a look at some tutorials on how to program for databases. What you are asking is rather simple but it seems that you dont yet have a grasp on even connecting to a database since your question isnt more exact. Here is a link to the … | |
Re: A messagebox should not be returning a value of zero. It is better to use the DialogResult constants to see what the values mean but again either way none of these values should be zero. Even clicking on the X button in the top right corner would return a default … | |
Re: Just to clarify, you want to show a messagebox when the form first loads correct? [Code=VB.Net] Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show("Hello World" _ , "Messagebox Caption Here" _ , MessageBoxButtons.OK _ , MessageBoxIcon.Information) End Sub End Class [/Code] | |
![]() | Re: Your error should be tripped on the line actually executing your statement. Therefore all that coding in your class sub should be within a Try Catch Finally block. In the finally section you should add the statement to close your connection so that it is closed whether or not an … ![]() |
Re: The following link has many walkthrough examples of how to work with vb.net & sql server. If you still are having a problem, let me know [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL] | |
Re: I would pick something worth showing potential employers in the future. Make sure it includes common functionality that any company could use such as intensive data processing/ importing-exporting files, reports, graphs etc. When I went thru school I seen to many immature programs (fantasy sports seemed to be the #1 … | |
Re: The other half of the internet must have contained the MSDN. [URL="http://msdn.microsoft.com/en-us/library/ms233676(VS.80).aspx"]Walkthrough: Creating an MDI Form with Menu Merging and ToolStrip Controls[/URL] [URL="http://msdn.microsoft.com/en-us/library/y0hkh2c8.aspx"]How to: Send Data to the Active MDI Child[/URL] [URL="http://msdn.microsoft.com/en-us/library/xyhh2e7e(VS.80).aspx"]Multiple-Document Interface (MDI) Applications[/URL] [URL="http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx"]Clipboard Class[/URL] | |
Re: When you call a datasets AcceptChanges method it automatically sets all rows to unmodified, removing and new, updated or deleted work you did to the dataset... So by the time you call update a few lines later, theres nothing to update Also when you use a dataadapter, you dont have … | |
Re: When you bind data to a listbox, most of the time the indexs are the same order as the data records in your table so it might not be a good idea to change item indexs directly. You can use the valuemember property of an item to hold an invisible … | |
Re: Thats not a short answer to give so instead I'll give you a link that offers some step by step database programming examples. If you're still stuck on something specific let me know. [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data WalkThroughs[/URL] | |
Re: If your app is running on a network I would say use the Active Directory to validate there login and assign security level but the groups in which they belong too. However you seem to be creating your own login system where the info is held in the database itself. … | |
Re: Yes that is a bit confusing, attaching the code would be helpful. | |
Re: Has a control or reference changed in the project? Also do you still have the problem after rebooting? | |
Re: A bit different but I wanted to offer a suggestion. You are first querying the DB and manually entering each name into your listbox and then re-querying the DB when a selection is made to get the specified record. I'm thinking that it would be easier and more efficient if … | |
Re: [Code=VB] Using sw As New System.IO.StreamWriter("C:\Sample.txt") 'Opens/creates file & StreamWriter object sw.WriteLine(TextBox1.Text) 'Outputs textbox value End Using 'Closes & disposes StreamWriter object [/Code] | |
Re: You can create public properties in your dialog form that can be accessed and the values can be passed back to the main form. | |
Re: Yes you can. Take a look at the following link that will provide some guidance for working with databases[URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"] Data Walkthroughs[/URL] | |
Re: Take a look at the Array.IndexOf method in the help file. It will show how to search an array and return the index of the result if found or -1 if not found. | |
Re: You stated in another post that this assignment is already completed, if so you may want to mark this as solved. Also since someone else may have helped you through this, I want to ask if you actually understand the work in its entirety. If not please give an example … | |
![]() | Re: CR has always seemed difficult to use, the documentation for it is very difficult to understand or even find what you are looking for. I dont think the lack of responses are due to your questions just that most have a problem working with CR themselves. As for passing parameters, … |
Re: Have to agree with ithelp, if you have others do it for you, you wont learn it for yourself. You would get much better results and help from others if you at least give it a try and then state where exactly you may be stuck. | |
Re: You do not need to explicitly close the reader & writer in this situation. The use of the "USING" block will open, close & dispose of the object when it exits the USING block. | |
Re: Running code in a constant/endless loop would be exactly that, your program freezing up the pc because its constantly running something over & over to search your server's status. If keeping in a console app, I would set it up so that the windows task scheduler runs the process once … | |
Re: Private Sub btnclearall_Click Dim ctl As New Control For Each ctl In Me.Controls Next 'Ok above you looped through all controls on your form but did 'nothing with each itteration 'Now below is only checking one single control, the last one of your form If Typeof ctl Is textbox Then … | |
Re: You need to be storing these individual values into numeric variables to be calculated at the end. [QUOTE=JRabbit2307;1035721][CODE=vb.net]'Radio Choice Selection Dim decRadioPrice As Decimal Console.WriteLine("Please enter the Radio Choice for your vehicle: ") Console.WriteLine("Enter 1 for AM/FM Radio") Console.WriteLine("Enter 2 for AM/FM/CD/DVD") strRadioChoice = Console.ReadLine() Select Case strRadioChoice Case "1" … | |
Re: The problem with the above statement is this loop will run constantly looking for this new value. You could change this to a timer event where you can set the interval of how often it checks to see if the value has change but again this is something that will … | |
Re: I dont understand the need for a loop to assign control values when only a single value can be displayed in the textbox and datepicker at a time. Also Im a bit confused by the naming conventions, a prefix for txt for a datepicker and your saying your looking for … | |
Re: This is a console app or is that just for your example? If a console app, I would start by displaying a list of the choices they have to pick from with an item/row number starting each line and then asking for them to type that item/row number in for … | |
Re: I agree calling a stored procedure to first delete your child records & then the parent is the way to go. However I would suggest not calling "exec" thru a regular query statement; this causes unneccesary processing by the database, it forces the database to first parse the info and … | |
Re: [Code] If TextBox1.Text.ToLower = User.ToLower And TextBox2.Text.ToLower = "it" Then [/Code] | |
![]() | Re: You can set the datetime column of the datatable to allow nulls but it wont accept blank strings. However I suggest that leaving a default date is good practice, filtering such as in a where clause on or against null values prevents the benefits of table indexing. |
![]() | Re: Short answer is Yes. Are you familar with retrieving database data and what exactly are you returning, a single value or many records that corrospond with a specific date? ![]() |
Re: If you set Option Strict & Option Explict to On you would see many errors within this example. Besides the variable "Name" all other variables are numeric but you are assigning text values to them without first converting them to a numeric value. Remember textboxes hold text, even if a … | |
Re: The DataGridView control is simply a means of displaying data from an underlying datasource such as a DataSet/DataTable/Array etc.... You do not want to add rows directly to the DataGridView, you want to add rows to the underlying datasource. Such as if you have a datatable attached, it is the … | |
Re: Ok first, what numeric value are you attempting to check for and what value in lstWorkships (listbox?) are you trying to get? I thought you mentioned this was a checkbox but your checking for a text value and seeing if it has a numeric value within it, so im a … | |
![]() | Re: Here is a C# [URL="http://www.codeproject.com/KB/vb/Image_in_Crystal_Reports.aspx"]example [/URL]that shows how to add a picture to a dataset and display in a Crystal Report. |
Re: You would have to provide more details. Add the block of code that is causing the problem and also provide the exact error message. | |
Re: Although you can upgrade some projects it doesnt really convert them to .Net. You are better off starting a new .Net project and just using the old project as a guideline for what needs to be recreated. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL] | |
Re: Remember that Opacity is a percentage; so a trackbar value of 50 isnt going to help in the form.opacity value. You need to convert it to 0.50. [Code] Me.Opacity = Dialog2.TrackBar1.Value / 100 [/Code] | |
Re: You can bind a DataSet/DataTable to a Listbox and have it automatically show one field as the DisplayMember and hide the Id within its ValueMember item property. Since you have 3 columns of information, I would suggest not even using a ListBox but instead use a DataGridView or ListView control … |
The End.