I'm having some issues with my MSR after it reads that data. I can find the device and read the data without any issues. When I try to do anything except message box the data, the code hangs without erroring out. What I'm trying to accomplish is that on each swipe of the MSR, a MDI child form is created. I get nothing when I try to create a new child or a new form from the DataEvent of the MSR.[code]
[URL] I am using the magtek Intellistripe 65 insert card reader and i want to connect the device thru my POS application developed in .NET. I have also tried the sample VB code provided by magtek. But i am not able to access the device.
my company provides security card for certain seller agents that sold our products to customers. they need to claim their point or login through PDA application by scan barcode or swipe magstripe (magnetic stripe). i had written the code for barcode scanner, and i had written the code for magstripe reader, but it didn't need any comm control at all. all i had to do was focusing on textbox that showed data had read.i had device to write data, it is MSRE206 with serial port. now i need code in VB to write data to magstripe. i didn't have any experience with comm control in VB, so i didn't know where i have to start?how to write a program in VB so that i can write data to a magnetic stripe on cards?
I need to be able to print ID cards with magnetic stripes. This is a simple matter of putting special code characters in the text to print. I can print text to the card printer from Notepad, and the printer knows to encode the stripe. This even works printing from a report in Access, but not from a Crystal report from a VB.NET app, and not from the PrintDocument object. All these do is print the information to be encoded on the front of the card. So I need to be able to print these from a VB.NET app, but not using CR or PrintDocument.
I'm having a bit of trouble developing my login page! Currently i have 2 text boxes which a user can input a username and password. My form should then check whether this data relates to the data in the database and either grant or deny access.The error i'm receiving occurs at the line "If theDataReader.HasRows Then"It says 'The data reader has been used before it is assigned a value"
First off, what I'm doing here is trying to read in information from a magnetic stripe card, parse it, validate certain parts and go from there. I'm working on two classes... the first is CardClass and that represents the card itself (well, the data obtained from the card). The class is CardParsingClass. This holds all the card parsing rules.
At one point in the process, I will create an instance of the CardClass. That instance gets passed into the CardParsingClass.ValidateData function:
CODE:
This function steps through each of the card parsing rules and applies the rule to cardCurrent to see if it passes (i.e., is valid).
And here we come to the meat of it.... what I'd like to do is define an event called FailedCardReadEvent. Whenever I raise the FailedCardRead event I could write to the log that it failed, modify variables in the CardClass (particularly the state of the card read variable), etc. So, the way I'm looking to use this would be something like this:
CODE:
So as shown above I'm thinking I should code a FailedCardReadEvent in the CardClass. But I don't know how to do that.
I also don't see how this is different than just calling a subroutine. If I have to manually raise the FailedCardReadEvent isn't that the same as calling a subroutine?
I know I'm missing something but I'm just not getting it. I've spent some time googling this morning and read a few things but I'm just not understanding how it all works.
I have a show button.The user will select a data from the dropdown list of the combo and on clicking the show button the corresponding data will be fetched from the database and will be shown in the corresponding fields.So I did this
Private Sub Show_Btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Show_Btn.Click Using connection As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=BankAccount.mdb") connection.Open() Dim command As New OleDbCommand("Select * from BankAccount", connection) Dim reader As OleDbDataReader = command.ExecuteReader()
I want to launch a application called Foxit Reader pdf Reader .I know System.Diagnostics.Process.Start(path) can do it but . Requirements are Foxit Reader should be installed on machine.Now if it is installed how to serarch for the path of its Executable to provide the parameter as I can not hardcode the path for different machines.
I am new to VB. I was trying to insert a record into access database with data reader. I was getting OVERFLOW error at runtime. My understanding is that overflow error occurs when we assign values that to variables that exceeds the maximum size of the data type.
Following is my code Private Sub InsertRecord(ByVal CustomerID As Integer) Dim RowArray() As String = Split(Me.lblRow.Text) Dim intPrice As Integer Dim decTotalPrice As Decimal Dim mySQL As String [Code] .....
I am having an issue with both Adobe Reader and FoxIt Reader when trying to print a PDF document. Both issues are different but a solution to either one will allow me to fix my issue.The issue I am having with Adobe Reader when trying to print using the following code is that it will not print it to the network printer I specify but just the default printer.
Dim AdobeReader As New Process AdobeReader.StartInfo.CreateNoWindow = False AdobeReader.StartInfo.Verb = "print"
how would I accomplish saving a large piece of data, using the Stream Reader for the Line-by-Line, while keeping the carriage return line feeds in there?
This one copied from microsoft web site, is this command working...? Error like " Executive Reader Requires.......Transaction property of the command has not been initialized..."
I have an error that is during the query to a database ExecuteReader 'phase' of my program, i am assigning an .OleDbDataReader to a variable RetVal and then, i am giving this RetVal = Query.ExecuteReader, and then in the while the query is being read loop(While RetVal.Read) i am getting an error in runtime that is "Invalid attempt to call Read when reader is closed." I know this means i have to open the reader, but i don't know how to do this, as i have been using this process for a few weeks and haven't had this error pop up. (and i have managed to use the while loop)If you're not living on the edge, you're taking up too much room
I am currently rewriting a VBA XML reader to a VB.net version for a project. I have the following code in VBA:
Dim XML_Doc As Object: Set XML_Doc = CreateObject("MSXML2.DOMDocument") Dim XML_Detail As New ADODB.Recordset: XML_Detail.ActiveConnection = "Provider=MSDAOSP; Data Source=MSXML2.DSOControl.2.6;"
I was told that I should be able to use almost the exact code in my VB.Net version but I am running into some problems. I added as a reference to the VB.net project the Microsoft ActiveX 2.8 so I can use the ADODB.
The code in VB.Net is
Dim XmlDoc As Object : XmlDoc = CreateObject("MSXML2.DOMDocument") Dim XmlDetail As New ADODB.Recordset : XmlDetail.ActiveConnection = "Provider=MSDAOSP; Data Source=MSXML2.DSOControl.2.6;"
When running the application it gets to the XmlDetail and throws the following error:System.Runtime.InteropServices.COMException was unhandled. Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
I am attempting to read specific lines of GIANT text files (> 150 MB) with hundreds of thousands of lines. The files are contained on an FTP site. I can successfully open the files using FTPwebrequest and streamreader but to get to a specific line using streamreader, you have to read every line before it. Obviously this takes a lot of time when you need to get to the millionth line.
A much faster way, I think, would be to use filestream and the filestream.position function. However, I'm not sure how to open a file as a filestream from FTP. I have tried:
Dim ftpaddress as string = "ftp://####@ftp.textfile.asc+" Dim fileStream1 As New FileStream(ftpaddress, IO.FileMode.Open, IO.FileAccess.Read)
I've been developing a simple virus scanner and it works by reading the hex code of a file and comparing it to signatures from a database. Anyway, the only thing slowing it down is how it reads the hex. This is the hex reading part of my code so far:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadFile.Click Dim ArrayHold() As Byte Dim Index As Integer = 0 Dim Str As New StringBuilder
I'm looking forward to make a system using a BCode Reader. Like the way when a book has a correspond barcode and when it scan by a BCode reader the correspond info on the book will be showed in he system. So how to code the BCode reader and how it will determine the barcode of a book or what ever items that has a barcode?
How do I really use data reader in vb.net. I'm using odbc to connect mysql and vb.net. Function I declared on a module:
Public Function form2search(ByVal drugname As String) As OdbcDataReader cmd.CommandText = "SELECT * FROM drug WHERE Drug_name LIKE'%" & drugname & "' " Return cmd.ExecuteReader End Function [Code] .....
I see a result, but it only loads the first item on the database. I've put this code in the text_changed event. What's the proper way of doing this? And what's wrong with the 2nd code, why is it only loading the first data. As you can see the con is the module where I declared the function. Then I created an object of it in the form.
Using VB 2010 on W7 x64 and I'm getting the HID device registered OK but then I never get the WM_INPUT messages. I test it on x32 Vista and same thing... no WM_INPUTs.
In an older program I am now maintaining, a SQL query is issued and the results are fed in to a DataTable and accessed through a DataTableReader.I see lots of lines like:
myInt = CInt(dtr.getvalue(42))
What I want to know is, would this ever differ from:
myInt = dtr.getint32(42)
If there could be a difference, what would trigger it?
its possible to find out in a reader how much reading is left to do. My code will be below and i think it be fairly possible during a query that would be returning data but is it possible during a query designed to give data?
Public Function queryup(ByVal queryString As String, ByVal connection As MySqlConnection) Try Dim newQuery As String() = Split(queryString, ":") For Each Query In newQuery
When I am using an OleDBConnection to read a CSV, I notice something strange When the datasource (folder) of the CSV has a number in it, it will ALWAYS skip the header record, regardless of whether HDR=Yes or HDR=No
Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + input_path + ";Extended Properties='text;IMEX=1;HDR=YES;FMT=Delimited;ImportMixedTypes=Text'") Dim command As New OleDb.OleDbCommand("SELECT * FROM [" + input_csvFile + "]", conn) Dim da As New OleDb.OleDbDataAdapter(command) da.Fill(input).ToString()