Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table read-only 2

Status
Not open for further replies.

psalyer

Technical User
Jun 20, 2001
30
US
Hi,
I have a table that is displayed on a form. When I do a searh and display the results of the Query on the form, a message displays in the upper right hand corner "This table is Read-Only. You will not be able to edit it". I know it is and don't want the message to display. Anyone know how I can stop the message from displaying?

Thanks Pete
 
Use the setting SET NOTIFY OFF in your forms Init() event.

HTH,
Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Thanks Weedz
I tried putting that code there and in my query before it redisplays the form. Still doesn't stop the message. What happens is the query runs and selects the records. the form is then called back and this message pops up and then the results are displayed.
 
Hi..
In the DataEnvironment ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Hi

Sorry for the incomplete posting above...

In the DataEnvironment of the form..
In the BeforeOpenTablesEvent .. put the code...
SET NOTIFY OFF

Also in the forms init event, you can put the same code. These two places are not complimentary. Put in both the places. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Thanks Ramani,
I put set notify off in both places in the data environment but the stubborn message still appears.

Thanks Pete
 
It could be posible that you are trying to manipulate the table somewhere on your form or in one of the controls.

Or maybe you have a grid that is not set to read only for this table.

Are you getting the same message when you do your query from the command promprt or from a prg ?

HTH,



Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Hi Weedz
I run the query from a prg and yes it still does it. The form has not table in the environment. The table is set when I run the query and call the form. I'm new at this so I probably have an error in the prg. The Read Only mesaage occurs when it finds matching records in the select statement and then calls the form. It repeats the message twice.
CLEAR EVENTS
RELEASE FORM
SET NEAR ON
SET EXACT OFF
SET TALK OFF
SET STATUS OFF
SET NOTIFY OFF
@00,00 CLEA
DEFINE WINDOW TWO FROM 08, 00 TO 18,100 TITLE 'BROWSE WINDOW' ;
COLOR W+/N,W+/B PANEL
ACTIVATE WINDOW TWO
MOVE WINDOW TWO CENTER
STORE SPACE(11) TO MREQ
@ 02, 05 TO 7,95 PANEL
@ 4, 07 SAY 'ENTER REQ NBR TO VIEW OR ESC TO EXIT ' FONT 'COURIER NEW',14 STYLE 'b';
GET MREQ FUNCTION "!" FONT 'COURIER NEW',14 STYLE 'b'
READ
SELECT * FROM CSL WHERE REQ_ID=MREQ ORDER BY REQ_LINE INTO CURSOR QUERY
IF !EOF()
CLEA EVENTS
RELE WINDOWS
SELECT QUERY
DO FORM REQ7
ELSE
CLEA
@02,07 SAY "No records found matching that criteria";
FONT 'COURIER NEW',14 STYLE 'b'
WAIT TIMEOUT 1
RELE WIND
SELECT CSL
SET ORDER TO REQ
DO FORM REQ7
ENDIF
RETURN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top