Solved

VB error

Posted on 2003-11-10
10
234 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

861 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now