Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB error

Posted on 2003-11-10
10
236 Views
Last Modified: 2010-05-01
I am using VB.NET and a WebApp

Any one know what a trigger is, related to an Sql query

Ssql = "BEGIN Pack_Utility.Proc_Login('PATIENT', 'PATIENT', '" & Session("sClientSerialNo") & "'); END;"


This query exexutes and fetches a Id known as a PracId which exists in a DataGrid....but the funny thing is if I leave the website Idle for a while the code gives me error and the trigger does not execute,

ORA-01400: cannot insert NULL into ("SOURCE_DEV"."AUDITLOG"."PRACID") ORA-06512: at
"SOURCE_DEV.TAU_AUDIT_SCHEDAPPOINTMENTS", line 20 ORA-04088: error during execution of trigger
'SOURCE_DEV.TAU_AUDIT_SCHEDAPPOINTMENTS'

0
Comment
Question by:Moizsaif123
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 1

Expert Comment

by:mgroyal
ID: 9718939
A trigger is a defined PL/SQL-Code in the oracle-db itself which execute a specific action for an appropriate event.

It looks like that you enter a record without filling the primary key.
SOURCE_DEV"."AUDITLOG"."PRACID" = Primary Key (can't be null)

Remove the primary key for testing purposes...

Cheers *mg

0
 
LVL 39

Expert Comment

by:appari
ID: 9719205
before calling
Ssql = "BEGIN Pack_Utility.Proc_Login('PATIENT', 'PATIENT', '" & Session("sClientSerialNo") & "'); END;"
check if session is expired or not by adding condition like
if Session("sClientSerialNo") <> "" then

if session is expired you can redirect the users to login page or whatever the start page of your application.
0
 
LVL 1

Expert Comment

by:mgroyal
ID: 9798666
solved?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Author Comment

by:Moizsaif123
ID: 9798794
It took me a while to understand what I asked as a question, but yea its solved so basically it wasnt the primary key that was null when I left it idle nor it was anything to do with the session expiring, the problem was in the Connection params I passed through the code, everytime the query was executed the connection params would close and open and close.....so I put opened the connection once for the execution of all the queries in the Page_Load event.



0
 
LVL 39

Expert Comment

by:appari
ID: 10066701
i object for delete,

see the following  question, asked after this question and there he was asking how to redirect to another page when page expires, it implies he has taken input from the responses in this question and asked another question. now trying to delete both the questions.
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20796139.html
0
 
LVL 4

Author Comment

by:Moizsaif123
ID: 10066819
well yu know yur answer did not help me however yu want to put it....and also i mentioned how to fix the error, other than that i dont know how to help yu
0
 
LVL 39

Expert Comment

by:appari
ID: 10067306

ORA-01400: cannot insert NULL into ("SOURCE_DEV"."AUDITLOG"."PRACID") ORA-06512: at
"SOURCE_DEV.TAU_AUDIT_SCHEDAPPOINTMENTS", line 20 ORA-04088: error during execution of trigger
'SOURCE_DEV.TAU_AUDIT_SCHEDAPPOINTMENTS'

i think the above error is not a result of connection problem. connection is proper and when executing the trigger it was trying to insert null into not null fields.
0
 
LVL 4

Author Comment

by:Moizsaif123
ID: 10071440
There was a open and close connection params that i had to place, some sort of wierd error but wasnt due to the null val of the primary key, other than this i dont know how to explain....

0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10088881
PAQed, with points refunded (180)

Computer101
E-E Admin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question