Cash.sql HILFE

05/09/2013 21:26 xFantaa#1
Hallo Epvp,
Mein Problem ist wenn ich die Cash.sql wenn ich auf !Execute drücke dann kommt ein fehler und da steht:

Fehler:

Line 1 und 2:

Mit freundlichen Grüßen
05/10/2013 05:45 nephren#2
Deine tabelle stimmt nicht mit den vorgegeben werten überein.

"Truncate" <- Leeren bringt nichts. Du hast ne zahl in einer vorgesehenen Buchstaben spalte etc... mal überprüfen ^^
05/10/2013 11:26 {Skrillex}#3
Quote:
USE [PS_GameDefs]
GO
/****** Objekt: Table [dbo].[ProductList] Skriptdatum: 05/10/2013 11:24:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
DROP TABLE [dbo].[ProductList]
CREATE TABLE [dbo].[ProductList](
[RowID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [varchar](50) NOT NULL,
[ProductCode] [varchar](20) NOT NULL,
[BuyCost] [int] NOT NULL,
[ItemID1] [int] NOT NULL,
[ItemCount1] [tinyint] NOT NULL,
[ItemID2] [int] NULL,
[ItemCount2] [tinyint] NULL,
[ItemID3] [int] NULL,
[ItemCount3] [tinyint] NULL,
[ItemID4] [int] NULL,
[ItemCount4] [tinyint] NULL,
[ItemID5] [int] NULL,
[ItemCount5] [tinyint] NULL,
[ItemID6] [int] NULL,
[ItemCount6] [tinyint] NULL,
[ItemID7] [int] NULL,
[ItemCount7] [tinyint] NULL,
[ItemID8] [int] NULL,
[ItemCount8] [tinyint] NULL,
[ItemID9] [int] NULL,
[ItemCount9] [tinyint] NULL,
[ItemID10] [int] NULL,
[ItemCount10] [tinyint] NULL,
[ItemID11] [int] NULL,
[ItemCount11] [tinyint] NULL,
[ItemID12] [int] NULL,
[ItemCount12] [tinyint] NULL,
[ItemID13] [int] NULL,
[ItemCount13] [tinyint] NULL,
[ItemID14] [int] NULL,
[ItemCount14] [tinyint] NULL,
[ItemID15] [int] NULL,
[ItemCount15] [tinyint] NULL,
[ItemID16] [int] NULL,
[ItemCount16] [tinyint] NULL,
[ItemID17] [int] NULL,
[ItemCount17] [tinyint] NULL,
[ItemID18] [int] NULL,
[ItemCount18] [tinyint] NULL,
[ItemID19] [int] NULL,
[ItemCount19] [tinyint] NULL,
[ItemID20] [int] NULL,
[ItemCount20] [tinyint] NULL,
[ItemID21] [int] NULL,
[ItemCount21] [tinyint] NULL,
[ItemID22] [int] NULL,
[ItemCount22] [tinyint] NULL,
[ItemID23] [int] NULL,
[ItemCount23] [tinyint] NULL,
[ItemID24] [int] NULL,
[ItemCount24] [tinyint] NULL,
CONSTRAINT [PK_ProductList] PRIMARY KEY CLUSTERED
(
[RowID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
Führe diese Query aus !

Und danach deine Cash.sql


MFG
05/10/2013 17:25 castor4878#4
Quote:
Column name or number of supplied values does not match table definition.
as far as I understand it, it means number of supplied values does not match table definition.

if you read the script you are trying to execute: you get, for instance:

INSERT INTO [PS_GameDefs].[dbo].[ProductList] values (
'foo bar', 'UNIQUE_TEXT_IDENT', 12345,
100163,1,
100083,1,
... 20 couples useless to list ...
0,0,
0,0)

if you display the table structure (quite hard, it requires 1 right-click!), you can get, as in Ex example:

CREATE TABLE [dbo].[ProductList](
[RowID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [varchar](50) NOT NULL,
[ProductCode] [varchar](20) NOT NULL,
[BuyCost] [int] NOT NULL,
[ItemID1] [int] NOT NULL, [ItemCount1] [tinyint] NOT NULL,
[ItemID2] [int] NULL,[ItemCount2] [tinyint] NULL,
item 3 up to 23
[ItemID24] [int] NULL,[ItemCount24] [tinyint] NULL)

comparing these two blocks leads to the difficult question: which required values is missing or which supplied values is in excess ?

it should be possible to assume that the (always useless, never used) RowID is the column for which the script does not provide value.

one possible fix is so to recreate the table, as suggered, but without that useless, never used column.
05/10/2013 19:33 xFantaa#5
Quote:
Originally Posted by ϟƘƦƖןןΣ✘ View Post
Führe diese Query aus !

Und danach deine Cash.sql


MFG
Hey DANKE :D:D:D:D:D:D

Hat geklappt :D