There Is Nothing Happen After Click Finish Checkout On My Shopping Cart Assignment

Mar 16, 2008

Hi all,

There is nothing happen when I finished my checkout process, I expect the data will be saved to order and orderitem table in my SQL database, but no data found on order and orderitem table and no error messages display during operation!!!

Below is my checkout.aspx.vb code, the whole code line number around 138, I captured the part from 1~ 64 line number, I suspect line 35 - 48 have a problem, can somebody help me, many thanks.

 1 Imports System
2 Imports System.Data.SqlClient
3 Imports SW.Commerce
4 Partial Class CheckOut
5 Inherits System.Web.UI.Page
6 Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
7 If Not Page.IsPostBack Then
8 If Profile.Cart Is Nothing Then
9 NoCartlabel.Visible = True
10 Wizard1.Visible = False
11 End If
12 If User.Identity.IsAuthenticated Then
13 Wizard1.ActiveStepIndex = 1
14 Else
15 Wizard1.ActiveStepIndex = 0
16 End If
17 End If
18 End Sub
19 Sub chkUseProfileAddress_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
20
21 ' fill the delivery address from the profile, but only if it’s empty
22 ' we don’t want to overwrite the values
23
24 If chkUseProfileAddress.Checked AndAlso txtName.Text.Trim() = "" Then
25 txtName.Text = Profile.Name
26 txtAddress.Text = Profile.Address
27 txtcity.Text = Profile.City
28 txtCountry.Text = Profile.Country
29 End If
30 End Sub
31 Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs)
32
33 ' Insert the order and order lines into the database
34
35 Dim conn As SqlConnection = Nothing
36 Dim trans As SqlTransaction = Nothing
37 Dim cmd As SqlCommand
38 Try
39 conn = New SqlConnection(ConfigurationManager.ConnectionStrings("swshop").connectionstring)
40 conn.Open()
41 trans = conn.BeginTransaction
42 cmd = New SqlCommand()
43 cmd.Connection = conn
44 cmd.Transaction = trans
45
46 ' set the order details
47
48 cmd.CommandText = "INSERT INTO Order(MemberName, OrderDate, Name, Address1, Address2, Country, Total) VALUES (@MemberName, @OrderDate, @Name, @Address, @city, @Country, @Total)"
49 cmd.Parameters.Add("@MemberName", Data.SqlDbType.VarChar, 50)
50 cmd.Parameters.Add("@OrderDate", Data.SqlDbType.DateTime)
51 cmd.Parameters.Add("@Name", Data.SqlDbType.VarChar, 50)
52 cmd.Parameters.Add("@Address", Data.SqlDbType.VarChar, 255)
53 cmd.Parameters.Add("@City", Data.SqlDbType.VarChar, 15)
54 cmd.Parameters.Add("@Country", Data.SqlDbType.VarChar, 50)
55 cmd.Parameters.Add("@Total", Data.SqlDbType.Money)
56 cmd.Parameters("@MemberName").Value = User.Identity.Name
57 cmd.Parameters("@OrderDate").Value = DateTime.Now()
58 cmd.Parameters("@Name").Value = CType(Wizard1.FindControl("txtName"), TextBox).Text
59 cmd.Parameters("@Address").Value = CType(Wizard1.FindControl("txtAddress"), TextBox).Text
60 cmd.Parameters("@City").Value = CType(Wizard1.FindControl("txtCity"), TextBox).Text
61 cmd.Parameters("@Country").Value = CType(Wizard1.FindControl("txtCountry"), TextBox).Text
62 cmd.Parameters("@Total").Value = Profile.Cart.Total
63 Dim OrderID As Integer
64 OrderID = Convert.ToInt32(cmd.ExecuteScalar())


 Below is checkout.aspx1 <%@ Import Namespace ="System.Data.SqlClient"%>
2 <%@ Import Namespace ="SW.Commerce"%>
3 <%@ Page Language="VB" MasterPageFile="~/SWSHOP.master" AutoEventWireup="false" CodeFile="CheckOut.aspx.vb" Inherits="CheckOut" title="Untitled Page" %>
4
5 <%@ Register Src="SWShoppingCart.ascx" TagName="SWShoppingCart" TagPrefix="uc1" %>
6 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
7
8 <asp:Label id="NoCartlabel" runat="server" visible="false">
9 There are no items in your cart. Visit the shop to buy items.
10 </asp:Label>
11
12 <div style="float:right">
13  </div>
14
15
16 <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="1" Width="274px">
17 <WizardSteps>
18 <asp:WizardStep runat="server" Title="Login">
19 <asp:Login ID="Login1" runat="server">
20 </asp:Login>
21 </asp:WizardStep>
22 <asp:WizardStep runat="server" Title="Delievery Address">
23 <asp:checkbox id="chkUseProfileAddress" runat="server" autopostback="True"
24 text="Use membership address"
25 OnCheckedChanged="chkUseProfileAddress_CheckedChanged"></asp:checkbox><br />
26 <table border=�0�>
27 <tr><td>Name</td><td><asp:textbox id="txtName" runat="server" /></td></tr>
28 <tr><td>Address</td><td><asp:textbox id="txtAddress" runat="server" /></td></tr>
29 <tr><td>City</td><td><asp:textbox id="txtcity" runat="server" /></td></tr>
30 <tr><td>
31 Country</td><td><asp:textbox id="txtCountry" runat="server" /></td></tr>
32 </table>
33 </asp:WizardStep>
34 <asp:WizardStep runat="server" Title="Payment">
35 <asp:DropDownList id="lstCardType" runat="server">
36 <asp:ListItem>MasterCard</asp:ListItem>
37 <asp:ListItem>Visa</asp:ListItem>
38 </asp:DropDownList>
39 <br />
40 Card Number: <asp:Textbox id="txtNumber" runat="server" Text="0123456789" ReadOnly="True"/>
41 <br />
42 Expires: <asp:textbox id="txtExpiresMonth" runat="server" columns="2" />
43 /
44 <asp:textbox id="txtExpiresYear" runat="server" columns="4" />
45 </asp:WizardStep>
46 <asp:WizardStep runat="server" Title="confirmation">
47 <uc1:SWShoppingCart ID="SWShoppingCart1" runat="server" />
48 <br />
49 <br />
50 Please confirm amount you wish to have deduct from your credit card.
51 </asp:WizardStep>
52 <asp:WizardStep runat="server" Title="Complete">
53 Thank you for your order.</asp:WizardStep>
54 </WizardSteps>
55 </asp:Wizard>
56 </asp:Content>
57 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
58 <asp:LoginView ID="LoginView1" Runat="server">
59 <AnonymousTemplate>
60 <asp:passwordrecovery id="PasswordRecovery1" runat="server" />
61 </AnonymousTemplate>
62 </asp:LoginView>
63 </asp:Content>
 

View 2 Replies


ADVERTISEMENT

How To Reduce Quantity ? [shopping Cart]

Feb 5, 2008

protected void Buy_Click(object sender, EventArgs e)
{SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
try
{String connStr = ConfigurationManager.ConnectionStrings["project_DataFile"].ConnectionString;
conn.ConnectionString = connStr;
conn.Open();
cmd.Connection = conn;ArrayList cart = (ArrayList)Session["Cart"];
{String oldSel = "SELECT Qty_warehouse FROM Producttable";
Int32 sel = 0;Int32.TryParse(oldSel, out sel);
string num = cart.Count.ToString();Int32 numQty = 0;
Int32.TryParse(num, out numQty);int nQty_warehouse = 0;
nQty_warehouse = sel - numQty;String sql = "UPDATE Producttable" + " SET Qty_warehouse =" + "'"+ nQty_warehouse +"'";
cmd.CommandText = sql;}
}catch (Exception ex)
{
Response.Write(ex.ToString());
}
finally
{if (conn.State.Equals(ConnectionState.Open))
{
conn.Close();
Response.Write("end.aspx");
}
}
 
from this code, i want to reduce product's quantity in database.
when I click buy button,it reduce old quantity and new quantity (quantity from cart when I want to buy it) in auto. 
please advise me.

View 3 Replies View Related

Wanted: Sql Shopping Cart Resources

Sep 30, 2005

hi! I'm still fairly wet behind the ears when it comes to databases, especially sql server 2000. But I just got a copy from my University and I really want to spend some time messing with it. The first thing I want to try is making a shopping cart that stores the items in the database rather than in the session. I'm using asp.net (VB) and I had previously made a simple shopping cart for a SMALL site that stored all the information in a dataset stored in the session... but I've been told that isn't a good idea and reccomended I store the data in the sql database. so that's what I want to do!

I'm looking for resources that can help me get this started. These are the first questions I have about this approach, and any advice from you experts would be most appreciated!

1) do I store the data in a temporary table or do I use the regular table and make temporary rows? if the former how do I transfer the rows from the temp table to the order table? if the latter how do I change it from temporary to peromanent? in either case, how do I eliminate rows if the user abandons their cart?

2) how do I first initialize an order and keep track of the orderID for each user and ensure that no one is assigned a duplicate orderID?

those are my biggest confusions about this approach. I've looked for books on this but most are either too much about sql syntax and big-time server management, or they are too general and not specific to sql server. I've tried looking online, but I can't find much information on doing this using asp.net 2.0. thanks again for your help!

-SelArom

View 6 Replies View Related

Empty Temp Shopping Cart Database

Jun 23, 2004

After a user adds items to the cart he doesn't checkout but leaves the site.

The next user on the same computer then opens another browser and sees the same items in the cart.

How do I Empty temp shopping cart database after leaving the site just like if I were using cookies.

Thx.

View 1 Replies View Related

Adding A Delete Functionality To My Shopping Cart

Dec 29, 2005

Hello,
I'm in the progress of developing a shopping cart system that operates with an SQL database in Visual Web Developer 2005. I've managed to successfully add items to the cart and display them, but I'm having trouble providing the user with the option of removing items from the cart.
My understanding so far is that I've got to adjust the DELETE SQL statement of the data source. At first I was thinking along the lines of a simple statement:
DELETE * FROM ShoppingCart WHERE CartID=@CartID AND CategoryID=@CategoryID AND ProductID=@ProductID
However, I've realised that the parameters I need for this SQL query aren't automatically passed in when a user clicks the "Delete" text of the Delete field (at least I think this is the problem).
The error message which I'm getting when I try to remove an item from the cart is as follows:
Incorrect syntax near '*'.
If anyone could let me know where I'm going wrong and point me in the right direction I'd be really grateful.
Thank you,
Luke

View 2 Replies View Related

Connecting Users From ASPNETDB.MDF To A Shopping Cart And Order History

Jan 2, 2007

I'm trying to figure out how to associate users in my ASPNETDB.MDF to create a shopping cart.IE: I have 3 tables, for a list of existing orders, list of products, and list of specific orders.The idea is for users who've signed up with the built-in user creation control, can then place orders from the shopping cart, and view their existing previous orders. This would normally be done with a unique UserID # to associate orders with specific users, however I don't BELIEVE there's anything like UserID's associated with each user in the ASPNETDB.MDF, it just uses usernames as the unique identifiers right?Anyway I'm not sure I'm explaining what I'm trying to do perfectly and I apologize, but I don't think it's an un-common problem I'm having. Basically I'm trying to avoid having to have existing ASPNETDB users create a sort of SECOND user that would associate them into a seperate Customers table, it seems like extra user steps that shouldn't be necessary.

View 1 Replies View Related

Shopping Cart, How Do I Subtract The Quantity Purchased From The Stock In Database?

Dec 11, 2007

Im making a shopping cart website for a school project in ASP.net with VB. I need help subtracting the quantity purchased (its saved in a session) from the stock number saved in a database.I know this:UPDATE inventory SET stock = stock - <quantity_purchased> WHERE id = <inventory_id>But I dont understand how to get the quantity purchased from the session to <quantity_purchased>. I tried putting the name of the session there and I got an error, i tried saving the session into a dim didnt work either.
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [stock] FROM [product]" InsertCommand="INSERT INTO [product] ([stock]) VALUES (@stock)" UpdateCommand="UPDATE product SET stock = (stock - @Quantity) WHERE (productID = @productID)">
<InsertParameters>
<asp:Parameter Name="stock" Type="Int16" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter Name="Quantity" SessionField="Quantity" Type="Int32" />
<asp:SessionParameter Name="productID" SessionField="productID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
 and I have than in my VB code on submit : SqlDataSource1.Update()

View 1 Replies View Related

Sequence Numbering Items In A Cart

Dec 15, 2005

I'm looking for any help/tricks on creating an item numbering system in a MSSQL database. The object is to number the items in a cart from 1 to whatever and have the ability for the user to change that sequence. The client wants the ability to order the items any way they choose by changing the sequence number. This process would require.
1. Starting at one (1) for the first item in the cart and incrementing from there.2. If I have 10 items and I change item 3 to 5,  items 4 and 5 have to increment down by one and 6-10 would stay the same. (and vise versa moving item 3 to item 1)3. If I have 10 items and I delete item 4, 5-10 must incremet down by one.
On 1 my first though in adding items is doing a select count to see if any items exist in the cart. If they don't assign the number one. if it does do a max on the sequence column and increment by one.
on 3 I would simply delete the item and do an update on all items with seq# > then the deleted Seq#
on 2 I'm not sure yet.
Am I on the right track and are there any tricks to doing this? Any help would be appreciated. This would all be done in stored procedures.

View 3 Replies View Related

SQL Shopping Adivce

Oct 29, 2007

Ok, we need to purchase a license enterprise license. However, I got confused on what to pick. We have one machine with a single processor. Does anyone have any idea on what to get? This is apparently my first time and there are a vast number of different options.
thanks in advance

View 9 Replies View Related

Shopping For DTS Package Scheduling Help

Mar 3, 2004

Good Afternoon

First time shopper on this board...hopefully you can help me.

I am trying to figure out how to schedule a DTS package located on a Server to run at a certain time. The DTS package will contain the path to a V/B 6 executable file residing on the same server.

So to test my methodology, I made a package on a server with code to run the V/B 6 executable off of my local machine. When executing the
package manually it works fine. However, when I schedule it the job does not start. I could not find a way to edit the job I had previously scheduled so I made another one in case I "fat fingered" something.
The same thing happens...no job starts.

Any ideas?

Thanks,
Ed

View 3 Replies View Related

Users Shopping For A Were Also Interested In B

Jul 23, 2005

How should I set up a database to be able to efficiently maintainassociations between related items?Example: Users shopping for Lord Of The Rings trilogy were alsointerested in The Hobbit.There will be many (20000+) items for sale and I need to do thisefficiently, but I don't have an idea how could I do it.TIA

View 4 Replies View Related

What Is The Best Way To Store A Shopping List Or Order?

Oct 17, 2006

After a customer decides to buy a shopping list, there is generally aneed to store/insert one master record and a variable number of childdetail records, preferably all wrapped in a transaction. There are lotsof ways to do this and I am wondering if anyone knows which is mostefficient.One approach is to use ADO.NET's transaction capabilities, definesingle-record insert procs for the master and detail tables, and callthe detail insert in a loop from the web page. This has N+1 trips tothe server, which is not too attractive.Another approach is to concatenate all the data into a bigstring/varchar variable and pass it to a decoder proc that would thencall the single record insert procs via a loop inside the decoder proc.This second approach would use T-SQL's transaction capability and haveonly one trip to the server, but it is more effort to code on the webpage and in the decoder proc.Surely this is a common problem. Are there any more elegant/efficientmethods that anyone can suggest? Can one pass an array to a proc? Isthis a place for a user defined data type?Any advice is much appreciated.

View 2 Replies View Related

Variable Assignment

Jul 21, 1999

How do you assign the value returned by a stored procedure to a declared variable and then display the value of that declared variable?

The following does not work:

declare @variable int
set @variable = stored_procedure
...
...
show value of @variable?? <HOW>

Sorry for the stupid questions but I am new to SQL in general.

View 1 Replies View Related

Need Urgent Help In Assignment Please!!

Apr 15, 2004

I want to know the answer of this question please as i have to submit my assignment as soon as possible. The assignmet question is" We use Composite Index on a table. Which of the following statements will speed up and slow down the operations respectively:
1-Select 2-Insert 3-Modify 4-Delete "

So is there anyone who can help me in this? i would appreciate that! :)

Thanks

View 4 Replies View Related

Variable Assignment

Apr 7, 2008

Is it possible to set the value for several variables from one select query?

View 1 Replies View Related

Need Help With SQL Server Assignment!

Dec 6, 2007

Hi everyone. This is my first time here, and I am really in need of some help! I am a senior Information Technology Major and I am in my first SQL course where I have to write a report on a company that uses SQL Server. I haven't been able to find any companies in my area, and need to find a company to write my paper on as soon as possible. I just have a set of brief questions; they are as follows (and I understand, for security reasons, if you are unable to answer certain questions, do not feel obligated to do so!):

Basics:
A brief overview of your company:
What is your position?
What the SQL Server database is used for?

Implementation:
Which version of MS SQL Server is used?
Type of instance(s) is(are) used?
Which authentication mode is used?
Do you utilize SQL Server Dynamic Disk Space Management, and if so, how?
How is data security maintained?
What type of encryption has been implemented?

Maintenance:
What type of backups are completed and how often?
How would the database would be restored in the event of data loss?
How do you preserve data integrity within the database?
Do you utilize any monitoring & troubleshooting tools to assess SQL Server performance (SQL Server Profiler, System Monitor, Database Engine Tuning Advisor, etc).

I greatly appreciate anyone willing to help me with my paper. Thank you!
Lynette

View 2 Replies View Related

Variable Assignment

Apr 7, 2008

Is it possible to set the value for several variables from one select query?

View 4 Replies View Related

Get Shopping List Based On Selected Recipes

Nov 19, 2007

Dear all,
I am trying to create a recipe database and one of the funtions is to generate shopping list based on the selected recipes.

at the moment, I have a table --recipe, a table--ingredient, and a cross
over table between these two, reIng.
Does anyone know how can I write a procedure with cursor that no matter how
many recipes the user selected, a list of ingredients will be created based
on that? Another things I can't solve is if an ingredient appears twice, how can I make them sum together..

I can write a simple procedure with one parameter so that I can get the ingredients for a certain recipe.( the parameter is the recipeID ). But I get struck when the possibility is that user will select more than one recipe and
wish to get a list of the ingredients. should I use a cursor to do that? Or I should create a temporary table to store the selected recipe?

THanks for your help!

View 1 Replies View Related

Dynamic Database Assignment???

Jan 25, 2001

I have an application that is developed to support a customer per database. All the data is unique to that customer and is physically partitioned from other customers. Also, I have a database that has common tables to all customers. I use stored procedures to access all data. I would like to keep from duplicating all the stored procedures (since the meat of them stays the same) because of the database references.

Is there any way to use the "USE <database>" functionality in the stored procedures to switch context dynamically without having to reference the unique databases?

Thank You,
Brian

View 4 Replies View Related

Parameter Assignment In DTS SQL Task

Sep 13, 2006

Greetings and salutations brilliant people!

I have a problem that I can't find any information on and I bet someone here has hit the wall on this.

I have 2 sql server 2000 servers runnng sql std edition. One has 8.00.2039 SP4 and one has 8.00.818 SP3. The server with SP4 will not let me use a parameter in the DTS SQL task. I get the infamous Access Violation Error. If I replicate the SQL task on the SP3 server I have no problem works great and life is good.

Can anyone tell me if thre is a hotfix for this or something? I've googled this to death and tried various possible fixes with no positive result. Any help would be greatly appreciated!!

Thanks for viewing! :)

View 2 Replies View Related

Inline Variable Assignment

Jan 22, 2004

I have to write a query for printing multiple barcodes, depending on the quantity of items that came in the store, based on the order number.



DECLARE @num INT
SELECT BarCodes.BarCode, BarCodes.ArticleID, ArticlesTrafic.DocumentID, ArticlesTrafic.TrafficQuantity
FROM BarCodes INNER JOIN
Articles ON BarCodes.ArticleID = Articles.ArticleID INNER JOIN
getAutoNumberTable(@num) ON @num=ArticlesTrafic.TrafficQuantity
WHERE (ArticlesTrafic.DocumentID = @Param2)



The thing i would like to do, is somehow assign a value to @num and pass it to the getAutoNumberTable stored procedure, which generates a table of consequtive numbers, so that each record is displayed multiple times. Is it even possible to do it without using temp tables and loops?

View 1 Replies View Related

Variable Assignment In Cursor Declaration

Jul 5, 2006

Hi,

here is the code segment below;
...
DECLARE find_dates CURSOR FOR
SELECT @SQL = 'select DISTINC(Dates) from ['+@name+'].dbo.['+@t_name+'] order by [Dates] ASC'
EXEC (@SQL)

but it gives error, variable assignment is not allowed in a cursor declaration. I need to use dynamic SQL , the only way to access all the dbs and their tables inside. Please help.

thanks

View 8 Replies View Related

Assignment Question, Hit Road Block.

Mar 14, 2008

I am new to sql.
Question1: How do i run a CHECK against serveral words.
e.g. check("name" is either bill or timmy or sally or jessy)

Question2: What is the best variable to use for time.

View 4 Replies View Related

What Will Happen If...

Dec 13, 2007

What would happen if I deleted all the contents of the tables like MSmerge_*.

In case it needs to be known, we have a merge-replication scenario with about 25 servers under SQL 2000 SP3.

Cheers,

Kias

View 13 Replies View Related

Local Variable Assignment In CREATE TRIGGER

Mar 7, 2006

Hi Guys,

i'm batttling with the below Trigger creation

__________________________________________________ _
CREATE TRIGGER dbo.Fochini_Insert ON dbo.FochiniTable AFTER INSERT AS
BEGIN
DECLARE @v_object_key VARCHAR(80)
DECLARE @v_object_name VARCHAR(40)
DECLARE @v_object_verb VARCHAR(40)
DECLARE @v_datetime DATETIME

SELECT ins.Cust_Id INTO @v_object_key FROM inserted ins <--- my problem area!!
SET @v_object_name = 'FochiniTable'
SET @v_object_verb = 'Create'
SET @v_datetime = GETDATE()

IF ( USER <> 'webuser' )
INSERT INTO dbo.xworlds_events (connector_id, object_key, object_name, object_verb, event_priority, event_time, event_status, event_comment)
VALUES ('Fochini', @v_object_key, @v_object_name, @v_object_verb, '1', @v_datetime,'0', 'Triggered by Customer CREATE')

END
________________________________________________

i'm trying to get the INSERTED variable from table FochiniTable on colomn Cust_Id

and the statement: SELECT ins.Cust_Id INTO @v_object_key FROM inserted ins - is failing [still a newbie on mssql server 2000]

any help will be appreciated
lehare.

View 1 Replies View Related

Help On Script Component Assignment Of Output Variable

Sep 7, 2005

Hi all,

View 9 Replies View Related

DTS Always Hangs On Finish

Sep 28, 2000

I am having a problem importing data into SQL 7 from any type of source. I go through the whole import process no problem. When I click the finish button to start the import, nothing at all happens. Enterprise Manager and the DTS just hang and I must use crtl+alt+delete to end the program. Can anyone give me any suggestions as to what might be happening. Big Thanks in advance, I've been working on this for days.

glevi

View 3 Replies View Related

Triggers Never Finish

Jan 2, 2004

I am a VoIP phone system using SQL on the back end. I am trying to get a Trigger to fire and email me when a certain number has been dialed.

Create Trigger trg_Emergency_Calls on dbo.CallDetailRecord for Insert

IF @@ROWCOUNT=0 RETURN ---NO rows affected exit proc

IF (SELECT finalcalledpartynumber FROM inserted)='95593684' BEGIN
--RAISERROR ('Call Stored Procedure Here',16,10)
EXEC WEB_SRVR03.master.dbo.sp_SMTPMail @body='This is a test Email'

END
Return

GO

The problem is I have to execute the actually email SP is on another server and has to be that way. The trigger actually runs each time but if the IF statement becomes true then the trigger hangs and never completes. Watching the other server(WEB_SRVR03) there is never a request to execute the sp_SMTPMail. I have been trying to troubleshoot this with profiler but I never see any locks or anything that would give me a problem. Also the insert statement that caused the trigger to fire also never finishes and so the record isn't written to the db. If anyone has any suggestions I would appreciate it.
Thanks

View 8 Replies View Related

How Long Ago Did Something Happen

Jan 7, 2008

Hey, ive got a listof events that have occured on my site, updates etc. and Im trying to show how long ago the updates happened. For instance, say the date of an update is : 16/10/2007 15:16:03 I want the Label to say "Happened over 2 months ago" etc.Now ive tryed to use an IF statment but I cant seem to get it right :         DateTime dt = Convert.ToDateTime("16/10/2007 15:16:03");        if(dt.ToShortDateString() == DateTime.Now.ToShortDateString())        {   //happened today            if(dt.ToShortTimeString() == DateTime.Now.ToShortTimeString()||dt.ToShortTimeString() < DateTime.Now.AddMinutes(-1).ToShortTimeString())            {   //happened within a minute                UpdateLabel.Text = "About A Minute Ago";            }        }        else if (dt.ToShortTimeString() == DateTime.Now.AddDays(-1).ToShortTimeString())        {   //happened yesturday            UpdateLabel.Text = "Updated Yesturday";        }        else if (dt.ToShortDateString() == DateTime.Now.ToShortDateString() || dt.ToShortDateString <= DateTime.Now.AddDays(-7).ToShortDateString())        {            UpdateLabel.Text = "Updated Last Week";        }Any ideas where Im going wrong? Im probally staring it straight in the face, but I cant see it. Thanks in advance John 

View 1 Replies View Related

What Will Happen -- ROLLBACK Or NONE?

Jul 14, 1999

Hi,

what will happen in the following occasion?

checkpoint --> begin tran --> system failure

In MOC (SQL 7.0 Implemetation), it says there will be rollback, but in my humbel opinion, there should be nothing happened.

I think there was no dirty writing in this case. No data pages written, no log
pages written to disk. Am I right? Then, there might be nothing happened
instead of ROLLBACK.

If I am wrong, would you please let me know what is wrong in my thougt?

Thanks in advance,

View 2 Replies View Related

It Can&#39;t Happen, SQL Locks Up

Dec 26, 1999

I am using SQL Server 6.5, when two or more independent applications put transactions through SQL, it locks up. Example of locks up.

When the OrderLines table is locked, then I put the following (Select * from OrderLines) then the query does not return any values, the world goes round and round, the only way out is to shut down and cross my fingers whilst SQL goes into recovery mode.

I have read through some of the documentation, such as deadlocks, livelocks and lock starvation but it say none of these will lock the whole machine. But somehow simultaneous transactions can, and the current activity dialog goes red, bright red.

Any ideas?

View 1 Replies View Related

Serious SQL Problem - Anyone Had This Happen?

Nov 22, 2002

I have a SQL 2000 server(sp2) on Win2000 SP2. My largest database is about 5 gig. Log shipping went astray and had to reinitialize. WHen I did the part where it actually backups the init db to disk failed with the following

3041 :
BACKUP failed to complete the command BACKUP DATABASE [Development] TO DISK = N'G:SQLBACKUPdevlog' WITH INIT , NOUNLOAD , NAME = N'Development backup', NOSKIP , STATS = 10, NOFORMAT

In the NT event log I got the following

{Lost Delayed-Write Data} The system was attempting to transfer file data from buffers to DeviceLanmanRedirector. The write operation failed, and only some of the data may have been written to the file.

MS had an article on this

http://support.microsoft.com/default.aspx?scid=kb;en-us;293842.

There solution is Win2000 SP3. Has anyone had these errors before.

View 1 Replies View Related

Move LDF -Has Anyone Seen This Happen?

Jul 20, 2005

HiWe have a SQL 2000 (sp3) server with a database that I set up to have theMDF on D: and the LDF on E:. All was going along fine for several months andone day the server rebooted. The SQL log says something like "Service isshutting down due to server shutdown."When it came back up the LDF File was on D: (in the same folder as the MDF).The original LDF was gone from E:The SQL Log doesn't ever say anything like "Recreating LDF in defaultlocation." or any anything else that would explain what happened.I assume the change happened during the reboot (actually I didn't notice ituntil a week and a half later). I am relatively sure no human did anythingthat caused the log file to move.So has anyone seen this happen before.?TIA-Dick

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved