I'm using a SQL Server 2000 stored procedure similar to the one below
to upload data to a database. This data is collected from the user on
a number of asp pages and stored in session variables (that's the way
I inherited the system...). When the user has captured all the info
and clicks the submit button the stored procedure is called and it
uploads the data to the database.
This normally works perfectly except for a few occassions when the
stored procedure has "failed" while loading the data onto the last
table (TestTable3) - the data in the session variables is not loaded
onto the database and the respective fields on the respective tables
are blank.
The most recent time it happened the user was using IE6.0 on Windows
XP.
Why is the stored procedure failing to complete?
The system uses code similar to the following to pass the information
that the user has captured to the stored procedure:
<!--#include file='dbConnect .inc'-->
<%
sqlstring = "EXEC dbo.InsertData @Test1 = '" & session("Test1" ) & "',
@Test2 = '" & session("Test2" ) & "', @Test3 = '" & session("Test3" ) &
"', " &_
"@Data1 = '" & session("TestDa ta1") & "', @Data2 = '" &
session("TestDa ta2") & "', @Data3 = '" & session("TestDa ta3") & "', "
&_
"@SomeData1 = '" & session("Test1" ) & "', @SomeData2 = '" &
session("Test2" ) & "', @SomeData3 = '" & session("Test3" ) & "', "'"
conn.execute(sq lstring)
conn.close
Set conn = nothing
%>
The stored procedure is similar to:
CREATE PROCEDURE dbo.InsertData
@Test1 NVARCHAR(10),
@Test2 NVARCHAR(10),
@Test3 NVARCHAR(10),
@Data1 NVARCHAR(50),
@Data2 NVARCHAR(50),
@Data3 NVARCHAR(50),
@SomeData1 NVARCHAR(10),
@SomeData2 NVARCHAR(10),
@SomeData3 NVARCHAR(10),
AS
BEGIN
SET NOCOUNT ON
DECLARE @ID INT
INSERT TestTable1
(Field1,Field2, Field3)
VALUES
(@Test1,@Test12 ,@Test3)
SELECT @ID = SCOPE_IDENTITY( )
SELECT ID = @ID
INSERT TestTable2
(ID,FieldAA,Fie ldBB,FieldCC)
VALUES
(@ID,@Data1,@Da ta2,@Data3)
INSERT TestTable3
(ID,FieldX1,Fie ldX2,FieldX3)
VALUES
(@ID,@SomeData1 ,@SomeData2,@So meData3)
END
GO 0 1380 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill MacLean |
last post by:
--
Example Schema posted at end of message:
---
For reporting purposes, I need to build a single comma delimited string of
values from the "many" table
of a database.
The easiest way to see what I want is to look at the sample after my
signature.
By the way, this is actually a busines problem, not homework! I just
|
by: Jiggaz |
last post by:
Hi,
Look my stored procedure :
__________________
ALTER PROCEDURE dbo.CreateAccount
@Nickname varchar(30),
@Password varchar(15),
@Email varchar(50),
@Date datetime,
|
by: dbuchanan |
last post by:
Hello,
I have an audit table into which I insert information about the use of
the application. This works sometimes and other times fails. I cannot
find any reason for it failing. It is always given the information.
Here are the errors I receive;
---------------------------
Exception Message: Procedure or function usp_UseAudit_ins has...
|
by: Larry Menard |
last post by:
Test code:
$dbconn = odbc_connect($dbname, $username, $password);
$path = "C:\Temp\myJar.jar";
$statement = "CALL SQLJ.INSTALL_JAR('file://$path', 'myJarId')";
$result = odbc_exec($dbconn, $statement);
Result:
PHP Warning: odbc_exec(): SQL error: CLI0119E Unexpected system failure.
|
by: Raoul Watson |
last post by:
I have used isNull statement for as long as I have used VB..
Recently I am devugging a program and it is very clear that the "IsNull"
function sometimes would return a true even when the value is not Null. Any
wild shot or theory as to why this is happening is appreciated. Also, any
other alternative is appreciated since I am stuck and...
| |
by: OutdoorGuy |
last post by:
Greetings,
I have the code below where I am instantiating Excel and then attempting
to the save the new workbook (as "Test.xls"). However, on the line of
code that attempts to save the workbook, I receive the following error
message:
"Object reference not set to an instance of an object."
Any ideas as to what I am doing wrong? .
|
by: craigkenisston |
last post by:
I can't believe what is happening on my computer right now.
I have a web project, file-system based on something like
c:\Projects\ProjectX\www\.
I had to make some changes and testing in a separate new directory so I
created c:\Projects\ProjectX\www2\ copied all the content and build. I
made the changes I wanted and test, everything worked...
|
by: TC |
last post by:
Hey All,
I'm receiving a weird error in IE now:
"The XML page cannot be displayed"
This is even with the simplest of pages that I previously could view.
Any ideas?
|
by: MLH |
last post by:
100 Dim db As Database, rst As Recordset
120 Set db = CurrentDb
140 PString = "SELECT qryBatchList.ReadyFor906, qryBatchList.BatchID
FROM qryBatchList WHERE qryBatchList.BatchID=GetCurrentBatchID()"
160 Set rst = db.OpenRecordset(PString, dbOpenDynaset)
At compile time, things are OK. But at run time, line #160
gives rise to an error saying...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |