Home » Developer & Programmer » Forms » Reading data from Serial port: Exception 305500 Un-handled (windows 2000, Forms 6i )
Reading data from Serial port: Exception 305500 Un-handled [message #415724] Wed, 29 July 2009 01:02 Go to next message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi All,

I am trying to implement the requirement of reading data from serial port using the code posted on this forum under the topic serial. I am encountering exception 1305500 Un-Handled exception on hold := ole2.get_num_property(CommHandle,'PortOpen');
I actually need an example to retrieve data from port .

Please provide some example.

Regards
RNSidhu
Re: Reading data from Serial port: Exception 305500 Un-handled [message #415950 is a reply to message #415724] Wed, 29 July 2009 22:32 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Post your code. Search this forum for 'CommHandle'.

David
Re: Reading data from Serial port: Exception 305500 Un-handled [message #415968 is a reply to message #415950] Thu, 30 July 2009 00:26 Go to previous messageGo to next message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi,

I have searched the forum with Serial and CommHandle , but everywhere i see that they encountered Exception 305500 Un-handled but there is no resolution posted for this .I want to know how its been resolved as i am facing the similar problem .

Below is the code i am using :

Declare
CommHandle ole2.obj_type; -- to hold the interface pointer
hold number;
NUM1 number;
string1 Varchar2(2000);
string2 OleVar;
Begin
CommHandle :=
forms_ole.get_interface_pointer'block3.OLE_CONTROL6');
Message(CommHandle);
OLE2.SET_PROPERTY(CommHandle, 'CommPort', 1);
--Num1:=OLE2.GET_num_PROPERTY(CommHandle, 'Commport');
/* try to close COM2, in case it was open for some reason.
0 = FALSE, -1 = TRUE*/
begin
OLE2.SET_PROPERTY(CommHandle, 'PortOpen', 0);--port open
exception
when others then
Message('Port is open');
end;
-- Set device to 9600 baud, no parity, 8 data, and 1 stop bit.
OLE2.SET_PROPERTY(CommHandle, 'Settings', '9600,N,8,1');
-- Open the port. 0 = FALSE, -1 = TRUE
OLE2.SET_PROPERTY(CommHandle, 'PortOpen', -1);
hold := OLE2.GET_num_PROPERTY(CommHandle, 'PortOpen');OLE2.set_PROPERTY(CommHandle,'InBufferSize',1200);
OLE2.SET_PROPERTY(CommHandle, 'InBufferCount', '0');
Exception
When Others Then
Message(SQlcode||sqlerrm);Message(SQlcode||sqlerrm);
End;

The colored statement : GET_NUM_PROPERTY is throwing exception : -3055500 Un-Handled exception.

Please provide me with the solution as to how to read the data from serial port resolving this exception and which property to retrieve to ge the data from the port ?

Regards
RSindhu
Re: Reading data from Serial port: Exception 305500 Un-handled [message #415975 is a reply to message #415968] Thu, 30 July 2009 00:40 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
When you post code, please use 'code' tags and format your code.

How do you know that the 'GET_NUM_PROPERTY' statement is causing the error? Did you use 'massage;pause;' pairs or another method?

Have you worked with the form in http://www.orafaq.com/forum/m/354940/67467/?srch=commhandle#msg_354940 ?

Have a look at the code, NOT the post (unless you can read Thai) in http://wiriya.com/board/index.php?action=recent;start=10

There is also code at http://forums.oracle.com/forums/thread.jspa?threadID=232458 and http://www.narisa.com/forums/index.php?showtopic=27193&bcsi_scan_80CA22F9AD71C623=ZSTjWgPpEIRIR5/Q1aL5fhYAAADMPRQ/&bcsi_scan_ filename=index.php

David
[EDITED by DJM: fixed bad url]

[Updated on: Thu, 30 July 2009 20:35]

Report message to a moderator

Re: Reading data from Serial port: Exception 305500 Un-handled [message #416018 is a reply to message #415975] Thu, 30 July 2009 03:28 Go to previous messageGo to next message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi David

Thanks for the reply. Yes i have gone through the code present in the form using that only i have written the code.
I have used message and pause also and it throws exception at this line only for 'GET_NUM_PROPERTY'.
Actually it throws this exception whenever i get the value of the property that has been set.

I have gone through the links you have posted but i couldnt get much from them .Mostly examples posted deal with the Excel sheet , pdf etc , so couldnt understand much.

I am using the same form module posted by manoj, it's also throwing exception if i un comment the particular line referring to 'GET_NUM_PROPERTY' .


Kindly provide inputs.

Best Regards
RSidhu
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416150 is a reply to message #416018] Thu, 30 July 2009 20:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have another look at http://forums.oracle.com/forums/thread.jspa?threadID=232458 and http://www.narisa.com/forums/index.php?showtopic=27193&bcsi_scan_80CA22F9AD71C623=RRYOARToIU1eFH4Y95QEbhYAAAAqq7o/&bcsi_scan_ filename=index.php I think that you have too many 'PostOpen' commands and you are not testing 'hold' after it is set.

David
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416182 is a reply to message #416150] Fri, 31 July 2009 00:41 Go to previous messageGo to next message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi David,


I have gone through these examples but everytime i get exception when i retrive value for the property set. I have removed the multiple setting of 'PortOpen' but still the exception is same when i retrieve value in hold:=OLE2.GET_num_PROPERTY(CommHandle,'PortOpen');
i am not able to check the value of hold because when i get the valeu in this variable it throws exception 305500 Un-handled and comes out.Please advice , Is there any problem in my Forms 6i or its installation , anything else which is required. I have the MSCOMM1 and had used it.

Regards
Roohie
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416453 is a reply to message #416182] Sun, 02 August 2009 23:50 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Which release of Forms 6i are you running?

David
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416456 is a reply to message #416453] Mon, 03 August 2009 00:01 Go to previous messageGo to next message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi David,

Thanks for replying .I am using Forms [32 Bit] Version 6.0.8.11.3 (Production)as I don't have Forms 9i and only this version is available to me.


Regards
RNSidhu
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416473 is a reply to message #416456] Mon, 03 August 2009 01:01 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have a look at http://www.tek-tips.com/viewthread.cfm?qid=643345&page=33 You probably need to upgrade your Forms 6i.

From http://kr.forums.oracle.com/forums/thread.jspa?threadID=237101 it would seem that you are on Forms 6i Release 2. This is way too low a release to produce effective code.

David
Re: Reading data from Serial port: Exception 305500 Un-handled [message #416489 is a reply to message #416473] Mon, 03 August 2009 01:53 Go to previous message
RNSidhu
Messages: 8
Registered: July 2009
Junior Member
Hi David,

Yes even i am facing similar issues listed for Forms [32 Bit] Version 6.0.8.11.3 (Production). I would upgarde my forms to Forms 10g. Would let you know if i am able to resolve the issue. Anything else you would like to advice me for implementing this ?
Previous Topic: A Complex Select Statement
Next Topic: Run Chart Item in Forms 6 (merged 3)
Goto Forum:
  


Current Time: Fri Sep 20 09:48:13 CDT 2024