Who can help me with this one.
I need to import data from a Data Interchange file (*.DIF) to a Dataset or Datareader
I was thinking to do that with a deserialization but I can not define the Dif format.
Any Idea how to solve this ?
Here an example how I load data from a binary file to a hashtable
Dim ConfigFile As New FileInfo(GetTypePath())
If ConfigFile.Exists Then
Dim bfConfig As New Formatters.Binary.BinaryFormatter
Dim fsConfig As New FileStream(Me.GetTypePath(), _
Me.oDataStore = CType(bfConfig.Deserialize(fsConfig), Hashtable)
I was thinking to replace the Hashtable with System.Windows.Forms.DataFormats.Dif
But that is not working. May be I need todo this with Direct Cast but I do not know how to that
I have developed a VB application. That simply have two Database, One source database is MS Access and destination database is SQL Server. Through this application it will import data from source db (Access) to destination db (SQL Server). when running application it works efficiently bout if yo see its status in windows task manager it display as "Not Responding", while it import all data successfully.
Does anyone find its solution?
You should post this question to the Operating System forum, but anyway I still answer your question.
Paps2 wrote: From the second PC I want to access only that folder of the first PC.
In case if you are using client/server with DHCP server, you must know the computer name and share name of your folder. If you the first PC name pc1 and the share folder name is test then on the second PC go to Start menu -> Run and type \\pc1\test and press enter.
In case if you are using static IP address of each machine, you must know the computer name or an IP address of the destination machine. If you the first PC name pc1 with IP address 192.168.1.10 and the share folder name is test then on the second PC go to Start menu -> Run and type \\pc1\test or \\192.168.1.10\test and press enter. But make sure that you have the following options:
1. Client: Client for Microsoft Network.
2. Service: File and Print sharing for Microsoft Network service.
3. Protocol: TCP/IP protocol.
A thousand mile of journey, begin with the first step.
I would appreciate it if some one could help me. I don't know how to write the code to save or save as in my forms. Here is the code that I have so far. Note that my parent form has file(new,open, save, save as, close) on it. I have already done the new code and I have been searching through the help files of .Net for 2 hours now with no help what so ever. Also please note that opion strict is set to on.
Public Class frmMDI
Dim counter As Integer = 1
Private Sub frmMDI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim j As Integer
'For j = 1 To 3
' Dim frmDocForm As New frmChild
' frmDocForm.MdiParent = Me
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
If e.Button.Tag Is "new" Then
ElseIf e.Button.Tag Is "open" Then
ElseIf e.Button.Tag Is "save" Then
ElseIf e.Button.Tag Is "bold" Then
Dim frmActiveChild As frmChild = Me.ActiveMdiChild
If (Not frmActiveChild Is Nothing) Then
'process the child form – save, close, whatever
frmActiveChild.txtDoc.Font = New Font(Me.Font, FontStyle.Bold)
#Region "Menu Code"
#Region "Window Code"
Private Sub mnuCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCascade.Click
Private Sub mnuHorizontal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHorizontal.Click
Private Sub mnuVertical_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuVertical.Click
#Region "File Code"
Private Sub mnuNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuNew.Click
Private Sub mnuOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuOpen.Click
<b> Private Sub mnuSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSave.Click
Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Private Sub NewFile()
Dim frmDocForm As New frmChild
frmDocForm.MdiParent = Me
frmDocForm.isDirty = False
frmDocForm.newDoc = True
frmDocForm.docName = "Document" & CStr(counter)
counter += 1
frmDocForm.Text = frmDocForm.docName
this is the code in my child form.
Public Class frmChild
'Public attributes (instance variables)
'isDirty: Set True if document needs to be saved
Public isDirty As Boolean
'newDoc: Set True if form was just created using New
'(no file on disk yet)
Public newDoc As Boolean
'docName: Set to filename of document (no path info)
Public docName As String
'pathName: Set to path (directory) where file saved
'(does not include filename)
Public pathName As String
Brad Fackrell wrote: I assume that it is bad practice to just execute ‘SaveData()’ in ‘frm1_closing’ and in no other location.
The reason why it's getting executed twice is because you execute it in the mnuExit handler AND your doing it again when the Closing event is fired. If you want to handle all possible ways of closing a form, then the Closing event is the way to go...
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Hi, I am having a problem with the drop down mode in a combo box. I have set up a combo box that allows the user to type values and the list will filter out and select the next closest item. It is a multicolumn, autocomplete combobox. The value member, text, and other properties can be found when the item exists in the list, but when the user types a value not found within the list, I get index 0 problems. I was wondering if anyone has any suggestions on how I can fix or get around this problem. Thank you.
I'm trying to parse a text file using the .readline() method of streamreader. My problem is that my code (below) won't work with text files that have blank lines. It thinks this is an 'end of the file' statement. Is there something else i can test in the conditional statement besides "Do until strLine = Nothing" so that i can read even a blank line and read the file straight through to the 'real' end of file?
strLine = srdCurrent.ReadLine()
Do Until strLine = Nothing
strFile += strLine & CrLf
strLine = srdCurrent.ReadLine()
Last Visit: 31-Dec-99 19:00 Last Update: 25-Jan-22 1:16