Showing posts with label updated. Show all posts
Showing posts with label updated. Show all posts

Thursday, March 8, 2012

cannot update all the values of Query

I have faced a situation that when i try to update a page. Some values can be updated while some cannot. I try to print the executed SQL query and get the following

1"UPDATE orders SET2cust_id=15,po_code='PO20060610',3po_amt=10000.0000,4add_charges=0,5commission='eeeeeee',6lab_charges=0,7fty_dis=0,8pay_trm='adasds',9cust_dis=0,10trade_trm_desc='',11curr_rate=1,12ship_expense=0,13shipmark='eng ship mard new2',14sidemark='Eng Side Mark new333'15,inner_box='Eng Inner Box new333',16confirmation='rend confirmation2',17contract='end contact23',18internal_remark='testing testing 26/6/2007 333',19rec_curr_rate=0,rec_amt=0,shipmark_attach='',20sidemark_attach='',inner_box_attach='',21ord_type=1,status=2,ord_confirm_code='',22commission_type=1,sidemark_lang='English',23curr_code='HKD',unit_code='PCS',24trade_trm='FOB Hong Kong',rec_curr='USD',25ord_date='2006/06/10', po_date='01/01/2007',exp_delivery_date='01/01/2007',26act_delivery_date='01/01/2007', pay_start_date='10/10/06',pay_end_date='10/10/06',upd_time='2007/03/15 15:41:14' WHERE ord_id=292;Set @.ord_id=292;"

The fields sidemark, inner_box, internal_remark cannot update, while others can.

I think it's really strange... since i have no idea why some can be updated while some others and the SQL seems to me is correct.

Please give me some advices on solving this.

Thank you.

If I run this query against the table (definition below) it all works and all of those fields are updated.

Perhaps there is a problem with the definition of the table - you can post the definition if you like and I'll test again with the same definition. I had to call my table orders2 as I tested in Northwind, which already has an orders table...

UPDATE orders2 SET
cust_id=15,po_code='PO20060610',
po_amt=10000.0000,
add_charges=0,
commission='eeeeeee',
lab_charges=0,
fty_dis=0,
pay_trm='adasds',
cust_dis=0,
trade_trm_desc='',
curr_rate=1,
ship_expense=0,
shipmark='eng ship mard new2',
sidemark='Eng Side Mark new333'
,inner_box='Eng Inner Box new333',
confirmation='rend confirmation2',
contract='end contact23',
internal_remark='testing testing 26/6/2007 333',
rec_curr_rate=0,rec_amt=0,shipmark_attach='',
sidemark_attach='',inner_box_attach='',
ord_type=1,status=2,ord_confirm_code='',
commission_type=1,sidemark_lang='English',
curr_code='HKD',unit_code='PCS',
trade_trm='FOB Hong Kong',rec_curr='USD',
ord_date='2006/06/10', po_date='01/01/2007',exp_delivery_date='01/01/2007',
act_delivery_date='01/01/2007', pay_start_date='10/10/06',pay_end_date='10/10/06',upd_time='2007/03/15 15:41:14' WHERE ord_id=1

CREATE TABLE [orders2] (
[ord_id] [int] IDENTITY (1, 1) NOT NULL ,
[cust_id] [int] NULL ,
[po_code] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[po_amt] [decimal](18, 2) NULL ,
[add_charges] [decimal](18, 2) NULL ,
[commission] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[lab_charges] [decimal](18, 2) NULL ,
[fty_dis] [decimal](18, 2) NULL ,
[pay_trm] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[cust_dis] [decimal](18, 2) NULL ,
[trade_trm_desc] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[curr_rate] [decimal](18, 2) NULL ,
[ship_expense] [decimal](18, 2) NULL ,
[shipmark] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[sidemark] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[inner_box] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[confirmation] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[contract] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[internal_remark] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[rec_curr_rate] [decimal](18, 2) NULL ,
[rec_amt] [decimal](18, 2) NULL ,
[shipmark_attach] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[sidemark_attach] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[inner_box_attach] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[ord_type] [int] NULL ,
[status] [int] NULL ,
[ord_confirm_code] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[commission_type] [int] NULL ,
[sidemark_lang] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[curr_code] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[unit_code] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[trade_trm] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[rec_curr] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[ord_date] [datetime] NULL ,
[po_date] [datetime] NULL ,
[exp_delivery_date] [datetime] NULL ,
[act_delivery_date] [datetime] NULL ,
[pay_start_date] [datetime] NULL ,
[pay_end_date] [datetime] NULL ,
[upd_time] [datetime] NULL ,
CONSTRAINT [PK_orders2] PRIMARY KEY CLUSTERED
(
[ord_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO


|||

Your orders is a table or View? Do you receive any specific error?

Thanks

|||

orders2 is a table.

I didn't get any errors and the update was sucessful.

|||

I see that yours is tableSohnee ,but the object orders with whichthtang has a problem is a table or view?

Sunday, February 19, 2012

Cannot setup SQL Server 2000 on W2003 Server

I have installed Windows Server 2003 Web Edition from scratch on a new system disk. I have updated with the latest service pack and security upgrades.

When I try to install SQL Server 2000 Standard Edition, the initial setup dialog Autoruns OK. I click on "SQL Server 2000 components", then on "Install Database Server". For a second or so a "Demoshield" pop-up appears, but that vanishes and nothing else happens.

Can anyone suggest what might be wrong? I am running on P4 1.7Ghz but only have 128Meg memory until the new chips arrive. I have around 15Gig disk space free on the drive I want to install on.

Thanks

Looks like this is not a supported configuration.

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

Tuesday, February 14, 2012

cannot see second drive??

I am running an SQL database on a win2000 server with SQL 2000 and all updat
ed service packs. I have a database that I would like to move to a second dr
ive on the same server. When I look into the database (properties\database l
ocations) I cannot see the
second drive, only the drive that SQL is installed on. The second drive is f
ormatted and data is on it already but I cannot see it when I use the browse
button from the above location. How do I see this second drive? Thanks in a
dvance for any help on thisVerify that the account that SQL Server starts under has full control of
the root of the drive. If the local system account is being used then make
sure the SYSTEM acount ahs full control.
Rand
This posting is provided "as is" with no warranties and confers no rights.

cannot see second drive??

I am running an SQL database on a win2000 server with SQL 2000 and all updated service packs. I have a database that I would like to move to a second drive on the same server. When I look into the database (properties\database locations) I cannot see the second drive, only the drive that SQL is installed on. The second drive is formatted and data is on it already but I cannot see it when I use the browse button from the above location. How do I see this second drive? Thanks in advance for any help on this
LVerify that the account that SQL Server starts under has full control of
the root of the drive. If the local system account is being used then make
sure the SYSTEM acount ahs full control.
Rand
This posting is provided "as is" with no warranties and confers no rights.

cannot see second drive??

I am running an SQL database on a win2000 server with SQL 2000 and all updated service packs. I have a database that I would like to move to a second drive on the same server. When I look into the database (properties\database locations) I cannot see the
second drive, only the drive that SQL is installed on. The second drive is formatted and data is on it already but I cannot see it when I use the browse button from the above location. How do I see this second drive? Thanks in advance for any help on this
Verify that the account that SQL Server starts under has full control of
the root of the drive. If the local system account is being used then make
sure the SYSTEM acount ahs full control.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Cannot see Report Builder in Report Manager

Hi Everyone,

I recently updated my instance of SQL Server 2005 express to install reporting services. I am able to navigate to the report manager url but the report builder button is missing. Also, when I go to the report manager url, It prompts me for the server's username and password. Does anyone know how I can fix this?

YOu will need to have report builder permissions (thats a report role) and you will need to have ReportBuilder functionality enabled in the config file:

http://msdn2.microsoft.com/en-us/library/ms365173.aspx

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||I do have the report role assigned to my username. When I connect to the report manager, what username and password should I be entering in the login box?|||By default members of the Administrators local group should be able to administer the report server and also add you to the appropiate group. If you are an administratior, you should use your own credentials, otherwise any local administrator (if this has not been disabled)

Jens K. Suessmeyer.

http://www.sqlserver2005.de