Is there a big difference between vb6 and vb.net as far as coding and design?
jds1207
Posts
-
vb6 & vb.net comparison -
databaseThis is how I am trying to get it. For example, If I insert a row into the database that have a department name HR and a username user.name and I try to insert another row that has the same department and username, the new row can't be inserted because the department and username already exists.
-
databaseI am trying to read a sql database so the same rows will not be inserted. I already got the connection I just need to know how to not insert the same row twice. I am using the VB language. Any ideas?
-
page navigationI have 2 web forms, default.aspx and default2.aspx created in my project. After default.aspx is finish I want to diplay default2 as a thank you page. How do I go about doing this? Thanks jds1207
-
checkboxI want to insert checkbox data into the database if the checkbox is checked. If the checkbox is not checked then don't insert the checkbox data. Mt code isn't working. Here is the code:
myCommand.Parameters.Add("Department", Data.SqlDbType.VarChar).Value = Department myCommand.Parameters.Add("Quality", Data.SqlDbType.VarChar).Value = Quality myCommand.Parameters.Add("Interpersonal", Data.SqlDbType.VarChar).Value = Interpersonal myCommand.Parameters.Add("Timelines", Data.SqlDbType.VarChar).Value = Timelines If CheckBox1.Checked Then myCommand.Parameters.Add("NA", Data.SqlDbType.VarChar).Value = NA End If myCommand.Parameters.Add("Comment", Data.SqlDbType.VarChar).Value = Comment myCommand.Parameters.Add("Domain_Login", Data.SqlDbType.VarChar).Value = UserName myCommand.Connection = myConnection myCommand.ExecuteNonQuery()
-
clear dropdownlist fieldHow can I clear a dropdownlist selected field without it removing the item out of the list? When I do: DropDownList1.SelectedItem.Text = "" it will clear the selected item out of the display and the list. jds1207
-
visual web developer 2008 express editionHave anyone ever worked with visual web developer 2008 express edition? If so how do you go about publishing your site with this tool? I keep getting a Parser Error message: unrecognized attribute in my web.config file. Any suggestions?
-
trying to connect to databaseI am trying to connect to a SQL Server 2000 database and I keep getting the following error: Cannot generate SSPI context Any ideas!
-
tablesThanks!
-
tablesI am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines. Any feedback would help. Thanks! jds1207
-
tablesI am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines. Any feedback would help. Thanks! jds1207
-
Learning ASP.Net -
Insert FileI am running a program that search .wav, .wmv, and .mp3 files on the computer and automatically stores them into a database table. The table name is tblFileReport. I have another table called tblExclude which includes files that are excluded. However, I do not want to insert the file into tblFileReport if the file exist in tblExclude. For example, if "ExcludeFileName" is equal to filename then I don't want this file to be added to tblFileReport. But, if the file is not in tblExclude then add the file to tblFileReport. Here is the code that I have so far:
For Each folder As String In paths Try For Each file As String In My.Computer.FileSystem.GetFiles(folder, FileIO.SearchOption.SearchAllSubDirectories, patterns) fileName = System.IO.Path.GetFileName(file).ToLower Insert(file, fileName, CType(IPAddress.AddressList.GetValue(0), Net.IPAddress).ToString, System.Net.Dns.GetHostName) 'End If Next Catch ex As UnauthorizedAccessException End Try Next
The string filename is the name of the file, for example chimes.wav, and if this name is equal to "ExcludeFileName" which is the filename column in tblExclude then do not add to tblFileReoport. I am thinking maybe an If, Then statement needs to be included in this code sample. Any ideas? jds1207 -
Get file ext. from databaseOk, this is very helpful but it still does not solve the problem. Database Table ExtID (AutoNumber) ExtType: .wmv;.wav;.mp3;.exe Currently my program search for file extensions by entering the extension into a textbox, for example wav;mp3;exe. Whatever extension is typed into textbox the program will look for those extensions. How can I search for specific file extensions from the ExtType column in database istead of entering the ext in the textbox? I have the field where all of the extensions are in one column.
-
Get file ext. from databaseI am working on a vb.net program that will search the directory for files. Currently, I search for files with a specific ext by entering the ext in textbox. Now, I want to be able to search the directory for the ext from a database tbl instead of entering the extensions into a textbox. I have a tbl in access called tblRestrFileExtension which has the following columns: ExtID (AutoNumber) ExtType: .wmv;.wav;.mp3;.exe Here is my project code:
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click lblStatus.Text = "Scanning Please Wait....." Application.DoEvents() Dim enteredFilePaths As String() = My.Settings.Path.Split(New String() {";"}, StringSplitOptions.RemoveEmptyEntries) Dim patterns As String() = TextBox2.Text.Split(New String() {";"}, StringSplitOptions.RemoveEmptyEntries) 'Declare a string array to store the file paths that are not found in the database Dim dv As DataView = dt.DefaultView Dim i As Integer For Each path As String In enteredFilePaths Dim strFilter As String = "ExcludePath LIKE '" & path & "%' AND (ExcludeFileName LIKE '%" & patterns(0) & "'" For int As Integer = 1 To patterns.GetUpperBound(0) strFilter += " OR ExcludeFileName LIKE '%" & patterns(int) & "'" Next strFilter += ")" dv.RowFilter = strFilter dv.Sort = "ExcludePath ASC" For i = 0 To dv.Count - 1 Me.ListBox2.Items.Add(dv(i)("ExcludeFileName")) Next i Next Dim fileName As String patterns = Array.ConvertAll(patterns, New Converter(Of String, String)(AddressOf ConvertFilters)) ListBox1.BeginUpdate() ListBox1.Items.Clear() Dim RootDirs As New List(Of String) 'Check to see if there there are any Root Directory path in Textbox1 string For idx As Integer = 0 To enteredFilePaths.Length - 1 'Bypass the drive letter so that any drive can be used If enteredFilePaths(idx).Substring(1).Trim = ":\" Then 'Get all the root folders Dim RootFolders As New System.IO.DirectoryInfo(enteredFilePaths(idx)) 'Add all the foilers to the RootDirs array list For Each dir As System.IO.DirectoryInfo In RootFolders.GetDirectories() RootDirs.Add(dir.FullName) Next 'C
-
Connection StringThanks, that worked great! jds1207
-
Connection StringI am trying to make my connection string variable using application settings under Project properties. Here is my connection string when it is hard coded: Dim myConnString As String = "Provider=Microsoft.Jet.OleDB.4.0;Data Source=" & Application.StartupPath & "\File.mdb" When I have it hard coded it works fine. But when I try to make it variable I keep getting the error: Format of the initialization string does not conform to specification starting at index 33. For the connection string value, I have the same code as posted above and I placed the following in the code: Dim myConnstring As String = My.Settings.ConnectionString ConnectionString is the name of the value in application settings. Can anyone help me with this connection string please. I know it may seem easy but I can't get it to work. jds1207
-
Progress BarHow do you get the progress bar to work in vb.net 2005? jds1207
-
vb.net icon -
create shortcut to desktopI am trying to create a shortcut to the user's desktop when I install the application on the user's machine. During the deployment process under the FileSystem(Setup1) tab, it gives me the option to create a shortcut on the user's desktop. When I right click on User's Desktop and choose Create Shortcut to User's Desktop, it will create a shortcut but when I try to open the shortcut from the desktop it opens up the Desktop folder instead of the actual program. Any ideas? jds1207