800 Posted Topics
Hello my fellow DaniWebers! I have a question for you! I have an ASP.Net website that I am currently working on. The problem that I am having is that I want to render the Master page's menu differently for the user types. Here is the catch. I can't use roles, … | |
Re: [Here](http://stackoverflow.com/questions/10833894/a-document-processed-by-the-jrc-engine-cannot-be-opened-in-the-c-stack) is a link that may help. It is written in C#, but the solution has nothing to do with coding. | |
Re: Are you programming in WPF (XAML) or WinForms? And when you say online/offline, what are you expecting to pull these values from? A browser? Code? What exactly? | |
Re: You will have to elaborate on what an "Artistic Warm" is, friend. | |
Re: If by old database path, you mean the path to your local database - you will have to change the a network path then re-deploy. | |
Re: I know one that you can clean that code up: DataAdapters For instance: Private Sub IssueInsert() Dim cmd As New SQLCommand("SELECT * FROM registered_cust_tbl",myCon) Dim da As New SQLDataAdapter(cmd) Dim ds As New DataSet Try da.Fill(ds,"tblRegCust") If IsNothing(ds.Tables("tblRegCust")) = False Then Dim dr As New DataRow = ds.Tables("tblRegCust").Rows.Add 'Put your … | |
Re: Is the listview set to view.Details? You can set this in the designer, and in the code. As far as loading data goes, the code snippet looks fine to me. I do not use readers as much though. I use DataSets/DataAdapters. You can do the same with them by: Dim … | |
Re: The safest way to do so, if you have not solved the problem, would be to use Properties. For Example: Public Class Form1 Public Property TextString As String Get Return TextBox1.Text End Get Set(value As String) TextBox1.Text = value End Set End Property End Class Public Class Form2 Private Sub … | |
Re: Is the application throwing the error on restore, or on the backup code? | |
Re: You will need to run [RegSvr32](http://stackoverflow.com/questions/3439845/register-32-bit-com-dll-to-64-bit-windows-7) on the dll to register it on the client machine. | |
Re: Any time you have values being loaded in to memory, you run the risk of slowing down a process. I suggest a small database backend to store the words/meanings/sample sentences. Then perform a lookup when needed. For example: ---------------------------------------------------------------- |__________________________tblWords____________________________| |_____ID_____|______Word ____|______Type______|____Sentence____| | Identity | VarChar(50) | VarChar(100) | VarChar(500) … | |
Re: What do you mean by package? An Installation Package? A dll? | |
Re: You are almost there. Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Try Dim val1 as Integer = Cint(TextBox1.Text.SubString(0,1)) Dim val2 as Integer = Cint(TextBox1.Text.SubString(1,1)) Label1.Text = "First digit:" & TextBox1.Text.Substring(0, 1) Label2.Text = "Second digit:" & TextBox1.Text.Substring(1, 1) Label3.Text = "Sum is:" & ((val1 *= val1) + … | |
Re: What it sounds like you want is a dataset to use, or threaded process to upload. The dataset being the easier of the two. Private Function GetDataFromFile(ByVal sPath as String) As List(Of List( OfString)) Try Dim sr As New StreamReader(sPath) Dim lstStrings As New List(Of List(Of String)) Do While sr.Peek … | |
Re: This sounds A LOT like a class project. As far as code goes, we can't help you until you show effort yourself. Do you have any code thus far? | |
Re: Have you tried an update on the whole ds? for example: CancelTemplateTableAdapter.UpdateCommand = New SQLCommandBuilder(CancelTemplateTableAdapter).GetUpdateCommand CancelTemplateTableAdapter.Update(CancelTemplate) | |
Re: What exception is being thrown? You have never stated it. | |
Re: You can make use of the [**DateName** and **DatePart**](http://msdn.microsoft.com/en-us/library/ms188651(v=sql.90).aspx) functions. | |
Re: If you are only wanting to capture keystrokes while your application is running, then look into keydown. If not, look into using [hooks.](http://msdn.microsoft.com/en-us/library/windows/desktop/ms632589(v=vs.85).aspx) | |
Re: You could loop through the values and check if they are equal: For i As Integer = 0 To dataGridView1.Rows.Count - 1 For j As Integer = 0 To dataGridView1.Columns.Count - 1 If IsNothing(dataGridView1.Rows(i).Cells(j).Value) = False And YourStringValueHere = dataGridView1.Rows(i).Cells(j).Value.ToString() Then 'Item found Exit For End If Next Next | |
Re: You could do something like the following: e.Graphics.DrawString(TextBox1.Text,f,br,50,50) If you wanted to pull them in from a dataset, you could do something like this: Dim da As New OleDBDataAdapter("SELECT * FROM myTable",myCon) Dim ds As New DataSet da.Fill(ds,"MyTable") If IsNothing(ds.Tables("MyTable")) = False And ds.Tables("MyTable").Rows.Count > 0 Then For i = … | |
Re: [Here](http://srikanthtechnologies.com/articles/dotnet/file_system_monitoring.html) is an article on watching a file system. (Which sounds like what you want to do.) | |
![]() | Re: When I first started programming, I had a huge task to tackle using AD. I used [this](http://www.codeproject.com/Articles/19689/Working-with-Active-Directory-in-VB-NET) for a reference to get me started. You can use the My.User.Name to retreive the user's login name. |
Re: There will be many different options for data manipulation. You can use bound controls. You can use GridViews. You can use ListViews. You can use Reporting. [Here](http://www.codeproject.com/Articles/3665/Data-binding-concepts-in-NET-windows-forms) is a very good article you might want to read. It will cover the basic concepts of databinding. I hope this helps! | |
Re: Be sure to reference the library in the project. Go to My Project > References > Add New > Navigate to the correct verison (14.0 I think) then add. | |
Re: Many questions have to be answered first. Is the database local or on a server? If local, you will just copy the database into the project. If on server, you will have to [connect](http://www.connectionstrings.com) to the server. If so, is the server using dns or an ip? Using the link … | |
Re: [Here](http://social.msdn.microsoft.com/Forums/en-us/winforms/thread/0e37da88-d327-445f-b719-92ff4975decc) is a link that might help you. It is to a MSDN thread for someone asking the same question. | |
Re: Is [this](http://msdn.microsoft.com/en-us/library/dd562852(v=vs.85).aspx) what you are looking for? | |
Re: I am sorry friend, for it seems you have posted in VB.NET. As for connections, you can find a good reference [HERE](http://connectionstrings.com/) I will flag your post for the moderators to move to the correct section so that you will receive the correct help. | |
Re: You can add the videos to your project as a resource. My Project > Resources > Add Existing File This will embed the videos in the project. Then to reference them, you can do something like My.Resources.ResourceName | |
Re: You just simply need to change your query: 'SQL Update statements will not have an INTO clause. Dim UpdateCommand As New OleDb.OleDbCommand("UPDATE tbl_Customers(cust_Company) VALUES(@custCompany)", con) | |
Re: This looks like it could be a .ini file for a game. Am I correct? 'THIS ASSUMES THAT THE FILE CONTAINS NOTHING BUT THE {NAME VALUE} FORMAT. 'Read all lines from the file, parse, and then index them. Dim sr As New StreamReader("PathToMyFile") Dim lstString As New List(Of List(Of String)) … | |
Re: You could split the line using the String.Split function and reference the index of that value. Example: Dim sr as New StreamReader("MyPath") Dim da As New OleDbDataAdapter("SELECT * FROM myTable", "MyConnectionString") Dim dt As New DataTable da.Fill(dt) 'This will loop until every line is read. Do While sr.Peek <> -1 … | |
Re: I am assuming that you are using a gridview or some kind of data control. Just create a DataSet/DataAdapter, and don't worry about storing values in row changed, you can simply do something like this: 'Creating the objects Dim da As New OleDbDataAdapter(New OleDbCommand("SELECT * FROM tbl", New OleDbConnection("myConStringHere"))) Dim … | |
Re: Just create a DataSet to hold the table in: Private Function GetTable() As DataSet Dim con As New Data.OleDB.OleDBDataAdapter("YourConnectionStringHere") Dim da As New Data.OleDB.OleDBDataAdapter(New Data.OleDB.OleDBCommand("SELECT * FROM tbl_Employees",con) Dim ds As New DataSet Try da.Fill(ds,"tbl_Employee") 'To reference the table, use ds.Tables("tbl_Employee") If ds.Tables("tbl_Employee") IsNot Nothing Then Return ds Else Return … | |
Re: Not sure if this helps (doesn't seem anyone else may have any ideas) but here is a [link](http://www.codeproject.com/Messages/3000519/Re-WebRequest-GetResponse-equals-error-407-Proxy-A.aspx) from code project that may help. | |
Re: After doing a little searching, I can see that you have used the code from bytes.com. [Here](http://www.vbforums.com/showthread.php?598355-Example-of-how-to-get-a-list-of-installed-programs-(like-Add-and-Remove-Programs)/page2) is a lengthy post on VBForumns that may be of some use to you. | |
Re: I would check your new statements: Dim ds As New DataSet9. Dim apt As New SqlDataAdapter apt = New SqlDataAdapter(sqlstr, constr) As these may be looking for parameters that you are not passing in correctly. My suspicion is on this statement: apt = New SqlDataAdapter(sqlstr, constr) I believe you may … | |
Re: If you are loading the pages into a hidden web browser control, you can make use of the [DocumentCompleted Event](http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documentcompleted.aspx). | |
Re: My question is - Is using a custom format on the DateTimePicker out of the question? Why are you using a MTB over the DTP? You can set custom DTP formats like so: DateTimePicker1.CustomFormat = "dd/MM/yyyy" Or you can set it by using the GUI. | |
Re: [Here](http://www.codeproject.com/Tips/181230/Convert-DataSet-or-XML-to-JSON-using-VB-NET) is a project on CodeProject to do just that. | |
Re: A main form with selections could be represented as a decision, or an output. My guess would be an output because the form does not chose by itself. Splash -> MDIForm -> Decision IMHO | |
Re: If the CompanyLogo object is a picturebox or image, you need to do something like this: If File.Exists(CStr(objDataSet.Tables(0).Rows(0)("LogoPath"))) Then If TypeOf CompanyLogo Is PictureBox Then CompanyLogo.BackgroundImage = Image.FromFile(CStr(objDataSet.Tables(0).Rows(0)("LogoPath"))) ElseIf TypeOf CompanyLogo Is Image Then CompanyLogo = Image.FromFile(CStr(objDataSet.Tables(0).Rows(0)("LogoPath"))) Else MsgBox("Type not determined") End If Else MsgBox("Path not valid/File not found.") End … | |
Re: Have you tried using [SendKeys](http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx)? | |
Re: Using [This](http://www.connectionstrings.com) you can find a string. Try something like this in a connect button click: Try Dim con As New OleDBConnection(Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database Password=" & txtPassword.Text & ";") 'Assuming the password textbox is name txtPassword. Catch ex As Exception MsgBox(ex.ToString()) End Try | |
Re: [Here](http://htmlagilitypack.codeplex.com/) is a HTML parser that I have seen people reference time and time again. Though I have never used it myself, you might find it usefull in this situation. | |
Re: Do you receive any errors while trying to run the application? It could be a number of things: ie... 1)[.NET Framework](http://www.microsoft.com/net) 2)A DLL the project is compiled with has to be [registered](http://stackoverflow.com/questions/4897685/how-do-i-register-a-dll-on-windows-7-64-bit) 3)You could have a [problem with the variables](http://stackoverflow.com/questions/723038/running-32bit-net-application-in-64bit-os-is-it-really-bad) that are 32bit dependant. I hope these help hunt down … | |
Re: Have you stepped through the code to find out which sheet/row/cell/line of code the error is being thrown on? Something that will give us a clue as to where the exception is being thrown? | |
Re: You can try something like this: Public Sub Node_Handler(ByVal sender As Object, ByVal e As TreeNodeMouseClickEventArgs) Handles SideMenu.NodeMouseClick Try If e.Node.IsExpanded Then MsgBox("Node will close") 'Your code here. Else MsgBox("Node will open") 'Your Code here. End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub |
The End.