Writing Data Out Com Port Doesn't Produce Expected Results?

Apr 17, 2012

If I have the following code I expect to see FF and AA in a Realterm capture window.Instead I get C3 BF.why I cannot output data on a comport and expect to see the same data captured?

Dim aChars() As Char
ReDim aChars(1)
aChars(0) = Chr(255)[code]......

View 6 Replies


ADVERTISEMENT

Writing Data To Serial Port?

Nov 27, 2010

I'm having problem while writing data to serial port. This piece of code is meant to write all the integer numbers in a text file to the SerialPort (connected to a USB-Serial Converter) when StartButton is clicked. However, it only managed to send two numbers and stopped at "USBSerialPort.Write(t, 0, 2)".

Private Sub StartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartButton.Click
USBSerialPort.DiscardOutBuffer()

[Coe].....

View 8 Replies

2 SQL Statements The Same? Will They Produce The Same Results?

Aug 22, 2011

Are the following 2 SQL statements the same? Will they produce the same results?

sql1 = "SELECT * FROM [StudentDetials] WHERE ([Subject1] LIKE '" & Subject(0) & "' OR [Subject2] LIKE '" & Subject(0) & "') AND ([Day1] LIKE '" & TabDay & "' OR [Day2] LIKE '" & TabDay & "') AND ([Time1] >= '" & Time(0) & "' AND [ETime1] <= '" & Time(1) & "' OR [Time2] >= '" & Time(0) & "' AND [ETime2] <= '" & Time(1) & "')"

sql1 = "SELECT * FROM [StudentDetials] WHERE ([Subject1] LIKE '" & Subject(0) & "' AND [Day1] LIKE '" & TabDay & "' AND [Time1] >= '" & Time(0) & "' AND [ETime1] <= '" & Time(1) & "') OR ([Subject2] LIKE '" & Subject(0) & "' AND [Day2] LIKE '" & TabDay & "' AND [Time2] >= '" & Time(0) & "' AND [ETime2] <= '" & Time(1) & "')"

In my case they simply produce the same results but that's because of the data i'm using.

View 1 Replies

VS 2008 Reading And Writing Data To A Serial Port

May 25, 2009

reading and writing data to a serial port. the settings for the port are correct (from manual of device):

[Code]...

View 1 Replies

Getting The Sql Code In The Rich Text Box To Produce The Results For The Query?

Apr 12, 2009

At present i have an interface which displays a string of sql code in a rich text box.

I also have my microsoft access database connected to the form.

How would i go about getting the sql code in the rich text box to produce the results for the query??

View 2 Replies

Query - Table Of Student Information - Produce The Results ?

May 4, 2012

I have a table of student information. Each student has a contact date and a source of information.

I want to produce the results like this

CODE:

At the moment I am using this sql

CODE:

But my results are like this

CODE:

It is just putting the total not the seperate amounts.

View 1 Replies

Start Writing A Store Produce And Function In SQL Management Studio Express

Oct 23, 2009

i grow familiar with statements queries of SQL. Now, i have to start writting a store produce and function in SQL Management studio express.

View 1 Replies

Asp.net - Linq Where Clause Not Producing Expected Results

Nov 8, 2011

I have the following xml:

<Root>
<Result img="1.png" name="a">
<Programs>

[Code].....

What is wrong with linq query. Why does a 1 work but a 2 does not? I would also like xml structure preserved after filtering.

View 1 Replies

Text Formatting Isn't Producing Expected Results

Oct 4, 2011

I'm trying to make a simple tool to format SQL code so that I can use it in VB.When I put in the following:

USE master
CREATE DATABASE netGuest
GO

I get...

"USE master" & vbCrLf & _"
CREATE DATABASE netGuest" & vbCrLf & _"
GO" & vbCrLf & _"

So it almost works. Really the only thing not working is that the lines are ending with the " rather than starting with them.Here's my code:

Protected Sub btnConvert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnConvert.Click
If txtVB.Text IsNot Nothing Then : txtVB.Text = "" : End If
Dim input() As String = txtSQL.Text.Split(vbCrLf)

[code]....

View 1 Replies

Adding Header Element Does Not Give Expected Results

Jan 25, 2012

I'm not very good with web services and I'm dealing with one developed internally in Java. This web service requires a Header element named Token with a value (an encrypted string). I've been able to add this "Token" but the service doesn't accept it. This is the request xml my proxy calls generates (proxy class built with WSDL.EXE and modified to accept a SoapHeader external class I wrote to add Header to request):

<soap:Envelope> <soap:Header>
<TokenHeader soap:actor="[URL]">
<Token>[TOKEN VALUE]</Token>
</TokenHeader>
</soap:Header>
<soap:Body>
</soap:Body>
</soap:Envelope>

And this is what the web services wants (this is a xml request made by a java tyest client):
<soapenv:Envelope>
<soapenv:Header> .....

This is the code I wrote:
Imports System.Web.Services
Imports System.Web.Services.Protocols
<System.Xml.Serialization.XmlRoot(Namespace:=[WSDL NAMESPACE])> _
Public Class TokenHeader
Inherits SoapHeader
[Code] .....

View 1 Replies

IDE :: Remove WHERE Statement Than Results Return Fine As Expected

Apr 8, 2009

[code] BUT, in code, watching the locals window for rec.EOF and rec.BOF both return true and therefore no results.Why does this work in VB Query Designer but not in code? If I remove the WHERE statement than the results return fine as expected.But its returning ALL of the results which is no good.

View 1 Replies

.net - LINQ: Except Doesn't Work In The Expected Way

Jul 18, 2011

I've problems to detect if there are new rows in a DataTable Email_Total that is yet not imported into ContactDetail.

Dim srcUnique = From row In src.Email_Total
Select row.ticket_id, row.interaction, row.modified_time
Dim destUnique = From row In dest.ContactDetail

[Code].....

View 2 Replies

VS 2008 Make Sure That The Old Code And New Code Produce The Same Results?

Dec 18, 2009

I am trying to rewrite some code and I am trying to determine if I am writing it correctly. My goal is to make sure that the old code and my new code produce the same results(i.e. are logically equivalent). Are the 2 code blocks below equivalent?

Old

If a = 1 then
If b = 3 OrElse b = 18 OrElse b = 20 OrElse b = 21 OrElse b = 4 then
' Do something

[code]....

View 4 Replies

Writing Out The PS/2 Port?

Jan 13, 2009

I am kinda a newbie to programming. I am looking to switch a KVM switch via a VB (express 2008) program.Which would require me to write {SCROLL LOCK}, {SCROLL LOCK}, and {UP ARROW} out of the PS/2 port (or out of a serial port). I have tried using the Keybd_event function, but this is apperently not what the KVM is looking for. Currently I have the PS/2 port hooked directly to the switching port of the KVM switch and an additional keyboard plugged in USB (the computer has found both ports).

View 1 Replies

Communications :: Port.BytesToRead Unexpected Results?

Sep 4, 2007

I am writing an app in VB2005 that makes a call to my cars ECU. It sends ok but during the DataReceived event I am getting an unusual result.I am trying to find out how many bytes are in the buffer so I can set up an array to write the data to so I have used the following.

intBTR = _Port.BytesToRead
_Port.Read(bytIncoming, 0, intBTR -1)

[code]......

View 3 Replies

Missing Last Row When Writing Query Results To Xls File?

Jul 22, 2011

I have a routine built to take query results and write them to an xls file. The problem is that I am only getting the column headers and 2 of the 3 rows of data. What am I doing wrong that the last row of data is not being written to the file?

[Code]...

View 2 Replies

Serial Port Not Writing Back?

Sep 16, 2010

I'm trying to connect to a Mettler Toledo Scale via a serial port to read in the weight of an object and output the wieght into a label or text box on the form.so I have a button and a text box. Here is my code

Private Sub btnSendText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSendText.Click
Dim Port As SerialPort = New SerialPort("COM1", 9600, Parity.None, 8, StopBits.One)
Port.Open()

[code]....

My problem is that the program hangs there doing nothing when I click the button.

View 29 Replies

Sql Query Doesn't Return Any Results On Datagrid

Jul 7, 2010

I'm using Visual Studio 2005, and I have a datagrid connected to a table from an Access database.

I added 4 textboxes so the user can type search filters to search within the table and a "search" button.

Then, I created a query using the "add query" tool on the datagrid. I wrote it like: select field1, field2, field3, field4, field5, field6 from table where field1=? and field2 like "%"+?+"%" and field3 like "%"+?+"%"
and field4 like "%"+?+"%"

Both field5 and field6 aren't search criterias, so I didn't add them to the query. Once the query was created, I replaced the parameters inside the procedure with my textbox1.text, textbox2.text, textbox3.text, textbox4.text and then cut and pasted the whole thing inside my SEARCH button click event, so the query is executed when the user clicks on the button.

Now the problem is: when I search using the first field it goes ok, but when I try to search by any of the other fields it returns zero results, even though I double-checked I had written the words correctly. I don't know why it does this. I already tried deleting the datagrid and creating it again.[code]...

View 6 Replies

VB Help Doesn't Show Contents Or Search Results

Aug 17, 2010

When I launch VB Help and do a search it shows under "Local Help", "Exception from HRESULT:0x8004032E". It lists three results under "MSDN Online", but the large field to the left of it is entirely blank. If I double-click blindly in that blank area it brings up various topics as if they were listed there but invisible. Further, the region under "Contents" is also blank, as is the "Filter by:" field. If I click the down arrow by the "Filter by:" field it brings up an entirely blank menu. If I then click outside the menu box it brings up a message saying "The selected filter contains an error that prevents it from being applied.". What's wrong and how can I fix it?

View 1 Replies

VS 2010 Writing To Parallel Port / Windows 7 64-bit

Mar 11, 2011

Does anyone have experience writing data to the parallel port (printer port) in Windows 7 64-bit. I have been trying inpout32.dll, inpoutx64.dll and following all the info on http://www.highrez.co.uk/ and www.logix4u.net but can't get anything to work. I have an on-board parallel port at &H378 - not an add-on card - and have tried various modes in the BIOS (standard, ECP etc). I have a background in electronics so I am confident my testing methods are sound; I just cannot get a data bit to change state under program control. I need to send data to an 8-bit port on some 20th Century electronics so serial/USB interfaces are not really an option. There must be a way to control those 8 data bits in Windows 7, mustn't there?

View 14 Replies

Writing A String To LPT1, The Parallel Port?

Dec 18, 2011

I have a fairly old radio receiver. (Icom R70) A friend and I have built an interface to control it from my computer. The interface is parallel. For me the interface is a black box. (My friend is the electronics specialist) In the description (25 years or more old) the statement to set a frequency and receive mode (like Am, FM etc) on the receiver is:print ".0:087330"

Today I am working in VB.Net and on Windows7 pro. I have already spent several days figuring out how to do this, but can't get it to work.I have found inpout.dll, but that does only allows me to write one byte at the time, and if I break up the above string and send nine individual characters, it does not work.

View 13 Replies

Writing To A Serial Port Using Mscomm32.ocx Control

Jun 17, 2010

In my windows application I am using Mscomm32.ocx control for serial communication.

I set the control properties like below in the Form1_Load event.

AxMSComm1.CommPort = 1
AxMSComm1.Settings = "9600,N,8,1"
AxMSComm1.InputLen = 0

[Code]....

View 7 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

.net - Produce Excel Document From SQL Data Table?

Apr 11, 2011

In my project I have a summary data table which i want to export in Excel document, for this purpose i have deployed the following code:

Public Shared Function Main() As Integer
Dim exc As New Application
exc.Visible = True

[Code]....

I get the error of : Exception has been thrown by the target of an invocation

View 1 Replies

USB To Parallel Printer(CEN36) - Doesn't Appear As LPT Port Device

Jan 26, 2012

I'd try programming in vb.net with a usb to parallel printer but it doesn't appear as LPT Port Device. It show as a USB Printer Support in USB Controller. Just to receive and send a bit in different pin to be in servo controller/driver.

View 4 Replies

Use COMM Port 2 To Get Information From A Device. .NET Doesn't Support It Though

Feb 9, 2010

I am writing a VB.NET app that has a piece which needs to send a small command to comm port 2 and get the return result. The problem is .NET doesnt have any support for serial communication seems like.

I just need to send the command "headtype" and get the result.

View 2 Replies

Writing Code For Controls That Doesn't Exist Until Runtime?

Dec 18, 2011

Im developing a program that adds any number of tabs for each directory that contains user specified information and also adds a list view control on each tab that shows the files contained in said directories. I want the user to be able to double click a file in the list view(s) to open it.

View 2 Replies

C# - Produce A PDF Report From Code In .NET For Scientific Data (winforms)?

Mar 13, 2011

I have a "legacy" VB.NET application (winforms) written for .NET 1.1, and re-compiled under 2.0 that produces a report in HTML via a custom XmlTextWriter wrapper that is suited for HTML. The user then would print the report into pdf if they wanted to.

That was 2003, and now technology has changed a bit, especially within the C#/VB.NET world, and customers want to skip the HTML part, and go to PDF directly. What are my options for open source, or low cost PDF libraries that work well with .NET and must support tables with pictures (generated bitmaps from code) and text.

[Code]...

View 6 Replies

Getting The Data From 3 Table In Linq And Produce The CSV File And Send The Mail

Jan 19, 2011

I am using window programming in visual studio(2008) and i am using LINQ and need to get the data from three table's column e.g A table's 1st column(x),b table's 2nd column(y) and c's table third column(z), and then i have to produce the excel sheet(CSV file).I want to get the table's data in string format in visual studio and then produce the excel sheet.I don't want to use Store procedure and grid view in my program.

View 5 Replies

VS 2010 Errors When Trying To Produce Reports From Inputted Data, And In The Code?

Mar 28, 2011

i'm a freshman and was handed this assignment a short while ago and i'm having extreme difficulty figuring out why i keep getting the following error message whenever i click btnGenerate.Click on the form:Error1: Unable to apply this change while debugging. 'Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter' was deleted that modifies 'Public Class Form1'. You must revert the change or stop the debugging sessionBasically the assignment is requesting that we build a 'Call Cost Calculator' and since im relatively new to this i've never worked with strings before and also get the follow errors:Warning2Variable 'sCountryBeingPhoned' is used before it has been assigned a value. A null reference exception could result at runtime.Warning3Variable 'sPhonePlan' is used before it has been assigned a value. A null reference exception could result at runtime.

My form codes:
vb
Public Class Form1 'heading Const sFormHeading As String = "Call Cost

[code]....

I reals because it's driving me mad and i'm honestly quite literally stuck and can't move on until i get this sorted.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved