Solved

VB error

Posted on 2003-11-10
10
232 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
Comment Utility
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
Comment Utility
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
Comment Utility
solved?
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 39

Expert Comment

by:appari
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
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
Comment Utility
PAQed, with points refunded (180)

Computer101
E-E Admin
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

771 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

14 Experts available now in Live!

Get 1:1 Help Now