Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

VB error

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
Moizsaif123
Asked:
Moizsaif123
  • 3
  • 3
  • 2
  • +1
1 Solution
 
mgroyalCommented:
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
 
appariCommented:
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
 
mgroyalCommented:
solved?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Moizsaif123Author Commented:
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
 
appariCommented:
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
 
Moizsaif123Author Commented:
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
 
appariCommented:

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
 
Moizsaif123Author Commented:
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
 
Computer101Commented:
PAQed, with points refunded (180)

Computer101
E-E Admin
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now