Filter Out 2005 And 2006 Ferrari's Out Of A Result

Nov 29, 2006

i have a table full of cars, from many makes and years (along with other info).

but I DONT want 2005 Ferrari's, or 2006 Ferrari's.

tried making a SQL statement, but it seems to filter out ALL ferrari's.

Here is the SQL i've tried:


SQL Code:






Original
- SQL Code




--SQL Stm #1
select COUNT(*)
from items
where account_id in (1667) and
items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND
( (items.Make != 'Ferrari' AND items.Year != '2005')
OR (items.Make != 'Ferrari' AND items.Year != '2006') )

--SQL Stm #1
SELECT COUNT(*) from items
where account_id=1667 AND
items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND
(items.make!='ferrari' and (items.year!=2005 OR items.year!=2006))






--SQL Stm #1SELECT COUNT(*)  FROM items  WHERE account_id IN (1667) AND       items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND        ( (items.Make != 'Ferrari' AND items.Year != '2005')        OR (items.Make != 'Ferrari' AND items.Year != '2006') )   --SQL Stm #1SELECT COUNT(*) FROM items WHERE account_id=1667 AND items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND(items.make!='ferrari' AND (items.year!=2005 OR items.year!=2006))



both takes out all ferrari's ?

View 3 Replies


ADVERTISEMENT

Format Date From 2/25/2006 To 02/25/2006

Mar 21, 2007

in footer of my report i show a current date by this

=Format(Today(), "d")

as a result i gave those

3/21/2007

but wont date like this 03/21/2007

How ?

View 1 Replies View Related

Using Like To Filter Result

Nov 20, 2007




Hi

when i execute this query



select * from Authors

where name like '%%' and id like '%%'

--name is type of varchar and id is type of int



i get all the result in the db

and if i put any filteration inside '%%' for the name or the id i get the filtered result correct



but i am trying to use this query inside a stored procedure

so i can send the id and name as parameters and when they are

empty i want to get all the result



i have done it for the name only but not for the id like this



declare @x varchar

set @x='r' --or ican set it to '' so i can get all results

select * from Authors

where name like '%'+@x+'%'


Any Help

View 8 Replies View Related

Which Edition And Build Of SQL Server 2005 To Use For Biztalk 2006?

Oct 12, 2007

Hi all -

We are planning to use a 2-node SQL Server 2005 cluster as part of a new Biztalk 2006 project, and I would like some advice regarding SQL Server service packs and editions.

Testing has already been running for some time without problems, but the test environment (a) is not clustered, (b) is using SQL Server 2005 Standard Edition rather than Enterprise and (c) has neither of the SQL Server service packs installed.

As this is a major project for us, my instinct would be to use Enterprise Edition (maximise performance and scalability)
and to apply SP2 (because I thought it was best practice to be up-to-date). I would have liked to do this before we go Live so we don't run the risk of having to change afterwards if we hit a problem.

Understandably, the project guys' perspective is this: testing so far has not been affected by SQL Server bugs, and we should go Live with the environment we have tested in, albeit with the planned 2-node cluster which is seen as a 'must have'.

I have trawled Books Online, Technet and other resources without success, so any thoughts or info on required, recommended or preferred combinations of Biztalk 2006 with SQL Server 2005 editions and service packs in a clustered
environment would be greatly appreciated - thanks!

Michael


View 5 Replies View Related

Trying To Split My Columns Into Years (col1 Must Have Vals For 2005, Col2 Vals For 2006)

Jan 26, 2007

Hi, i'm reasonably new to reporting services and am looking for a way to split my reports' Years to compare the months in year 2005 to 2006 but i can't get my data nest to one another in a single line, it splits the years into different rows

as an example this is what i want if you can decipher that
















2005
2006
Growth
2005 Year to Date
2006 Year to Date
Year to Date Growth




turnover
gross profit
turnover
gross profit
turnover
gross profit
turnover
gross profit










Jan
250500
75300
280200
84100
11.85629
11.686587
250500
75300










Feb
205000
67950
190350
59900
-7.14634
-11.84695
455500
143250
take the month above and add the
current months values


Mar
217670
70540
234200
78000
7.594064
10.57556
673170
213790










Apr
270780
84000
290400
93000
7.245735
10.714286
943950
297790










May
265000
79260
289050
90200
9.075472
13.802675
1208950
377050










Jun
277300
81050
277900
82000
0.216372
1.172116
1486250
458100










Jul


























Aug


























Sep


























Oct


























Nov


























Dec



























Here is my Query:

SELECT /*DT.[YEAR],*DT.[MONTH],*DT.MONTH_NAME,*/ DC.CLIENT_KEY, (select SUM(FT.Cost)where dt.[year] = 2005) AS COST , (select SUM(FT.Price)where dt.[year] = 2005)AS SALES,(select SUM(FT.Cost) where dt.[year] = 2006),(select SUM(FT.Price) where dt.[year] = 2006)--, SUM(FT.QTY) AS QUANTITY, SUM(FT.PRICE) - SUM(FT.COST) AS GP,(SUM(FT.PRICE) - SUM(FT.COST)) / SUM(FT.PRICE) * 100 AS GP_PERCENTAGEFROM FACT_TRANSACTION FT, DIM_TIME DT, DIM_CLIENT DC, DIM_INVOICE_TYPE DIT, DIM_PRODUCT DPWHERE FT.TIME_KEY = DT.TIME_KEYAND FT.PRODUCT_KEY = DP.PRODUCT_KEYAND FT.CLIENT_KEY = DC.CLIENT_KEYAND FT.TYPE_KEY = DIT.TYPE_KEY AND DIT.TYPE_KEY NOT IN (5,6,13,14,15,16,17)AND DC.CLIENT_SERIALNO = '86634'--AND DT.[YEAR] IN(2005,2006)AND DT.[MONTH] IN(1,2,3,4,5,6,7,8,9,10,11,12)AND DP.PRODUCT_KEY <> 1668684GROUP BY DT.[YEAR],DC.CLIENT_KEY--, DT.[MONTH]ORDER BY /*DT.[YEAR],*/DT.[MONTH]
but it returns everything under one another

2005 1 January 2005 3 296092.3431 405263.62 12811 109171.2769 26.93
2005 2 February 2005 3 318597.658 432098.17 13220 113500.512 26.26
2005 3 March 2005 3 371327.721 506481.46 15283 135153.739 26.68
2005 4 April 2005 3 371647.994 504713.99 15491 133065.996 26.36
2005 5 May 2005 3 400870.6138 542759.57 16296 141888.9562 26.14
2005 6 June 2005 3 399673.0086 546110.59 16607 146437.5814 26.81
2005 7 July 2005 3 390477.7521 535531.40 16153 145053.6479 27.08
2005 8 August 2005 3 380628.57 520281.87 15800 139653.30 26.84
2005 9 September 2005 3 340949.8849 471861.17 14820 130911.2851 27.74
2005 10 October 2005 3 340240.804 470007.78 14444 129766.976 27.60
2005 11 November 2005 3 349156.1871 481193.61 14523 132037.4229 27.43
2005 12 December 2005 3 346038.5059 477011.72 14865 130973.2141 27.45
2006 1 January 2006 3 340062.1369 470010.08 14037 129947.9431 27.64
2006 2 February 2006 3 328463.9689 452404.79 13996 123940.8211 27.39
2006 3 March 2006 3 375264.977 517800.27 16065 142535.293 27.52
2006 4 April 2006 3 412708.965 567014.52 17550 154305.555 27.21
2006 5 May 2006 3 446973.4231 606476.26 18920 159502.8369 26.29
2006 6 June 2006 3 406072.4943 544634.77 17053 138562.2757 25.44
2006 7 July 2006 3 389104.6316 526091.14 16228 136986.5084 26.03
2006 8 August 2006 3 317810.4531 431530.58 13641 113720.1269 26.35
2006 10 October 2006 3 405230.7083 549310.72 17151 144080.0117 26.22
2006 11 November 2006 3 379788.6645 514554.14 15917 134765.4755 26.19
2006 12 December 2006 3 393235.0906 531582.69 16924 138347.5994 26.02

If i do get them split then it put every year's value on a different line

2005   1234123.34    32432432.43   NULL   NULL
2006   NULL               NULL           12312.212   15235453.21

Please Help,

View 1 Replies View Related

SQL Server 2005 - Filter For This Month Only

Feb 7, 2007

Hi, I have done a quick search for a similar topic, but I don;t think they are what I need. What I want to do is (when creating a view in the database) I want to filter entries in my table that have only been created this month (the field I am looking at is called DateDB), I'm not sure how to do this, I have tried =MONTH(GETDATE()), but this doesn't return any values at all. Is there a way of doing this? 

View 2 Replies View Related

Profiler In SQL 2005 Filter On Host Name

Oct 25, 2007

How do you get sql2005 profiler to filter on host name, (computer name of the client) like you can in sql2000 profiler. 2005 Profiler column filter options seem to omit this, this makes the application virtually useless in most situations.

View 1 Replies View Related

Profiler In SQL 2005 Filter On Host Name

Oct 25, 2007

How do you get sql2005 profiler to filter on host name, (computer name of the client) like you can in sql2000 profiler. 2005 Profiler column filter options seem to omit this, this makes the application virtually useless in most situations.

View 1 Replies View Related

Automatic Select Filter (something Like Global Table Filter)

Apr 15, 2008

Hello,

Here is my problem:


I use SQL Server 2005. I have approx. 50 tables in my database and 30 of them have a filed named "CompanyID". Example:
create table A (ID int identity, NAME varchar(100), COMPANYID int)create table A (ID int identity, REF_ID int, FIELD1 varchar(100), FIELD2 varchar(100), COMPANYID int)

Also there are nearly 200 stored procedures that read data from these tables. Example:
create procedure ABCasbegin /* some checks and expressions here ... */ select ... from A inner join B on (A.ID = B.REF_ID) where ... /* ... */end;

All my queries in the Stored procedure does not filter the tables by CompanyID, so they process the entire data.

However, now we have a requirement to separate the data for each company. That means that we have to put a filter by CompanyID to each of those 20 tables in each query where the tables appear.

Firstly, I put the CompanyID in the context so now its value is accessible through the context_info() function. Thus I do not need now to pass it as a parameter to the stored procedures.

However, I don't know what is the easiest and fastest way to filter the tables. Example:

I modified the above mentioned procedure in the following way:
create procedure ABCasbegin /* some checks and expressions here ... */
-- gets the CompanyID from the context: DECLARE @CompanyID int; SELECT @CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))
select ... from A inner join B on (A.ID = B.REF_ID) where ...
and A.COMPANYID = @CompanyID and B.COMPANYID = @CompanyID /* ... */end;

Now I have the desired filter by CompanyID. However, modifying over 200 stored procedures is rather tedious work and I don't think that this is the best approach. Is there any functionality in SQL Server that can provide the possibility to put an automatic filter to the tables.
For example: when I wrote "SELECT * FROM A", the actual statements to be executed would be "SELECT * FROM A WHERE CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))".

I was looking for something like "INSTEAD OF SELECT" triggers but I didn't manage to find any answer.

I would very grateful is someone suggests a solution for something like "global table filter" (that will help me make an easy refactoring)?


Thanks in advance.

Best regards,
Beroetz

View 5 Replies View Related

2006-07-26 00:00:00

Jul 28, 2005

This is the result I get in Word as I handle a document that merges datafrom the database. The field «Date_Fin_Membre» returns me this resulteven if the query stipulatesWHERE (dbo.Membre.Date_Fin_Membre = CONVERT(Char(10),dbo.Membre.Date_Fin_Membre, 101)). I have also tried other types ofconversion without any success.thanks

View 6 Replies View Related

Auto Filter In 2005 Reporting Services

Feb 7, 2007

Hello Experts,
I have been playing around with RS 2005 and like it so far. I am in the process of replcating some excel reports in RS. I was wondering if there is any way to replicate the Auto Filter Functionality of Excels sheets where column is a dropdown with disticnt values of that specific column and also has Top 10 and Custom filters attached to it. So when selected from dropdown the report filters for these records.
I understand we can use parameters for this kinda report but my client has 15 columns in the report and it will be cool to give them auto filter functionality as in Excel as they are used to it.

Any help will be appreciated.

View 7 Replies View Related

And/or Filter Field Not Enabled In The Group Filter Tab

Jan 26, 2006

Howdy,

I have a table that has a group. In this group, I want to filter by 2 different expressions, concatenated with an OR. BUT I can't change the "And/Or" column value for the first entry because it is grayed out. The column will automatically change to an OR value if both my expression column fields are the same (which I don€™t want) but if I put any other value in to the expression field of the second row, the "And/Or" field of the first row automatically changes to an AND.

PLEASE! How do I get the And/Or field "ungrayed" so I can change it to what I want?

The 2 filters I and using check the UserID = to the user, and the other is checking a count to get the Top N 1. (So just showing the current user and the top producer)

View 14 Replies View Related

01012006 Or 01/01/2006

Jan 1, 2006

hello

I store date like 01012006 for 01/01/2006

I store them as type varchar

and I have to use them in query (where date='01012006')

do you think I should store date as normal format as datetype?

View 6 Replies View Related

SQL 2000 And ISA 2006

Apr 11, 2007

Hi,



Does SQL 2000 support mutiple IPs in a proxy server (ISA2006) senario? i.e. can SQL 2000 serve both intranet and extranet, with extranet being separated by firewall?



Extra info: SQL 2005 can clearly listen to mutiple IPs, but SQL 2000 does not seem to have such feature.



Thanks in advance.



Kevin

View 1 Replies View Related

SQL Server 2005, Parameterized Filter: Snapshot Could Not Be Applied

Sep 28, 2005

Hi

View 8 Replies View Related

PDF Filter For MS SQL Server 2005 Full Text Search

Jan 23, 2008

Hello, I have read on the multiple places that filter for full text search of PDF files using FTS2005 is included in the Reader 8 etc. However, I have not found any document or instruction etc on adobe documents, microsoft documents or web that details on how to actually configure the filter. Please help. thanks
Kumud

View 4 Replies View Related

200611 To String 'Nov 2006'

Nov 13, 2006

Hihow to conert (number) 200611 to string 'Nov 2006' ?thanks

View 4 Replies View Related

Issues Using SQL CE 3.5 With MapPoint 2006?

Mar 4, 2008

Has anyone else had difficulties using SQL CE with MapPoint 2006?
I had assumed that since they both 'talked' OLEDB, they should be compatible with one another.

I have approx 15,000 rows in a SQL CE Table with Lat and Long columns that I'd like to import or link with MapPoint.

I've created a .udl file with the OLEDB connection string and sdf filename like so:

[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=c: estsqlcompactdb estdata.sdf;

Which I can select from the MapPoint Import/Link wizard and it lets me choose a table to import.
It shows a preview of the data in the table, lets me choose column mappings, and if I'm attempting to link data it asks me to choose a column to use as the primary key.

If I attempt to import data it essentially spins forever importing row

'15588 of -1 records mapped; 0 not mapped', (ie. it cycles through all the rows that exist in the table but never completes, then only thing I can do is press 'Cancel') and if I attempt to link data I just get an error message. "Failed to link data"
My workaround for this behaviour is potentially to write small process using System.Data.SqlServerCe or ADO to import the data into MapPoint by calling the MapPoint DataSet APIs directly, but I think you ought to be able to link the data right in using the udl datalink method.

View 1 Replies View Related

How Do I Adjust Object Explorer Filter Settings? - SQL Svr Mgt Studio 2005

May 7, 2008

My default filter settings are:          Name       Schema      Created
How do I add an additional filter such as 'Modified'?
I can get into the Filter Dialog box by clicking on the Funnel, but I can't figure out how to add another filter to the list.
 
-smc

View 3 Replies View Related

Access 2003 / SQLSEE 2005 - Using Forms To Filter Recordsets

Aug 7, 2006

I upsized an Access 2003 database to SQL Server Express Edition 2005, and have converted all tables, queries, reports and macros successfully so far. The snag I'm running into involves using macros embedded in buttons on certain forms using Access as the frontend.

With these forms, the idea is to navigate to a certain record, and hit a button to bring up a print preview view of a report. Based on the record you're looking at in the form, it should check against the data in the table to which it refers, and pull up a single record in the report.

In access as a standalone, using the OpenReport command, the code was as follows:

[MRB Report Data]![MRB Report Number]=[Forms]![MRB Data Input]![MRB Report Number]

MRB Report Data is the table containing data, and MRB Report Number is the primary key (autonumber). MRB Data Input is the form in question, and the second MRB Report Number is the control field that references back to the MRB Data Input table.

When I try to run this using Access as a frontend, an error occurs at the first '!' - is there a different syntax I need to specify to reference a form in this case?

Thanx in advance.

View 4 Replies View Related

Should We See Replication Filter Where Clause Text In Profiler TextData On SQL Server 2005?

Sep 25, 2007


We have Merge Replication publications for SQL Server 2005 Compact Edition subscribers.
Some articles have filter statements that send rows to multiple subscribers, based on the value of Host_Name() supplied at run-time.

Our publications work for most subscribers, but we have at least one subscriber who downloads too many rows from one of the filtered tables.

When we run the Select SQL from the article's Filter statement it returns the intended 4 rows for this subscriber.
We cut and pasted the filter statement into query analyzer, substituted the subscriber's value for Host_Name(), executed the statement, and got the proper 4 rows for this subscriber in the results.

But when this subscriber syncs her Compact Edition database it downloads 10 rows - the proper 4 rows that the filter statement should pass, plus 6 other rows that she should not download.
Our hypothesis is that the Filter statement is not properly applied to the article when this subscriber syncs.
Other subscribers get the proper rows when they sync, so the publication's filter statement works in some cases, for some values of Host_Name().

We'd like to see the application of the filter statement at run-time (sync-time), but we have not found the text of the filter statement in SQL Profiler output. Should we expect to see the text of the filter statement in SQL Profiler output?
Is there a better way to debug this error?

FYI, here's the text of the article filter statement:


SELECT <published_columns> FROM [dbo].[TBL_USER] WHERE user_sys_id in (

select u.user_sys_id

from tbl_user u

join tbl_territory t on u.territory_gid = t.territory_gid

where t.terr_no_id like (

select

case (select t.data_access_qnty from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())

when 2 then (select t.terr_no_id from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())

when 3 then (select left(t.terr_no_id,5)+'%' from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())

end

)

)

And here's the statement we ran from Query Analyzer:


declare @id varchar(10)

select @id = 'aultnc'

SELECT * FROM [dbo].[TBL_USER] WHERE user_sys_id in (

select u.user_sys_id

from tbl_user u

join tbl_territory t on u.territory_gid = t.territory_gid

where t.terr_no_id like (

select

case (select t.data_access_qnty from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)

when 2 then (select t.terr_no_id from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)

when 3 then (select left(t.terr_no_id,5)+'%' from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)

end

)

)

Thanks

View 4 Replies View Related

Report Builder - Filter Dropdown Order Post 2005 SP2 Incorrect

Mar 7, 2007

Hi All,

Hope someone can help here. Since installing Service Pack 2 onto our SQL 2005 instances our report models are not working correctly. When selecting fields within the models as filters, and getting them to prompt when the report is run, the ordering of the data within the filters does not match the selected ordering in the model definition. The ordering is random each time the report is run.

This issue does not happen when setting the filter up, the data appears in the correct order, but when running the report the filter data is incorrect.

I have spent the last 4 hours building a new system and testing this with each stage of service packing. The RTM version of SQL 2005 is ok, SP1 is also OK, but when SP2 is applied the ordering fails.



Any ideas?



Many thanks in advance.



Regards



Nick

View 4 Replies View Related

How To Find List Of All Mondays In 2006

Jul 3, 2006

I have a one problem in my sql server. I would like to find out the list of all Monday's dates in the year 2006. Can anybody help me out?.

View 14 Replies View Related

Write To Text Destination Only The 2006-03-13

Mar 4, 2008

Hi,

I want to convert/write from my source to my text file: the date column.

I have a date column of : 2006-03-13 00:00:00.000

but when it writes to flat destination i only want to write: 2006-03-13

Any ideas, Please assist!

Regards

View 4 Replies View Related

Connect Delphi 2006 To MS SQL Express

Mar 23, 2006

I use Delphi 2006 to connect MS SQL Express 2005. When I save record, it shows the following error message:

Database Server Error : Cannot create new transaction because capacity was exceeded.

Does anyone know what happen and how to solve?

Thanks!

View 1 Replies View Related

SP2 CTP November 2006 Installation Failed

Nov 9, 2006

I have Windows XP Home Edition SP2 English Version. I installed MS SQL Server 2005 Developer Edition and after reboot I Installed SP 1. Now I try to install SP2 CTP November 2006. In Installation Progress dialog when Setup Support Files are in progress I get an error message - Unexpected Error Occured Unable to create backup folder and show me second message box with error Hotfix.exe has encountered a problem and needs to close.

Regards

Maciek

View 6 Replies View Related

DateTime Format Problem: Setting To 16/Mar/2006 8:50:00 AM

Aug 2, 2006

my Current DateTime Format is         01/08/2006 9:15:00 AM
i want to set it to                                01/Aug/2006 9:15:00 AM
what parameter will be pass in "SET DATEFORMAT"?
plz help and give me a chance of thanks.
 

View 7 Replies View Related

Problem Connecting To SQL Server 2006 Express

Mar 18, 2007

I have been trying literally for months to get SQL Server 2005 Express to work on my Dell Dimension WinXPPro machine. I have installed and reinstalled both the server and the 'Management System'. I have shut down and restarted all of the related Local Component Services on my machine (with the exception of the SQL Server Active Directory Helper which will not start ??).

I have reviewed much of what is in this Forum related to SQL Server 2005 Express and I find that many have had similar problems. When a connection is attempted, the following message or some minor variation appears:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)


In desparation, and at the suggestion of one of this forum's moderators, I went to try to download the SQL Server 2005 Express, Service Pack 2. I threaded my way through what I felt was an unecessarily complex set of links and finally reached a download site - but it was unclear whether or not the service pack was for SQL Server 2005 or the Express version. Giving up in dispair, it turn to you (once again BTW, I received no real help with this same question about a month ago).

Even though I seriously doubt if anyone will help me, I am willing to give it another try - mainly because I am home sick with the flu and having nothing better to do on a Sunday afternoon.

Thanks

View 6 Replies View Related

Data Access Using Ent. Library Jan. 2006 Release

Sep 6, 2006

Hello ...

Using Ent. Library Jan. 2006 release and .Net Framework 2.0, I'm connecting to SQL Server 2000 using Microsoft.Practices.EnterpriseLibrary.Data.Sql.

I have a windows service that processes jobs asynchronously and from time to time, I'm getting the following error --

"A connection was successfully established with the server, but then an error occurred during the pre-login handshake. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (TCP Provider error: 0 - An existing connection was forcibly closed by the remote host. "

What's surprising is the error message saying SQL Server 2005. Has anyone encountered and resolved this?

Thanks.

allanroy

View 6 Replies View Related

EnterpriseLibrary 2006 DATA ACCESS LAYER

Sep 27, 2007

in the class library i written the code name :customer is the lib name

using System;

using System.Collections.Generic;

using System.Text;

namespace Customer

{ class Entites

{

public int inTest;

public int inTest2;

}

}


Now in the Class1.cs i written the code

i am getting the data from the database by using enterprise lib 2006 connection function

now HOW TO BIND THE DATA TO LIST AND RETURN TYPE IS LIST
PLEASE CHECK THE CODE AND REDEFINE THE CODE


using System;

using System.Data ;

using System.Collections.Generic;

using System.Collections.Generic;

using System.Text;

using Microsoft.Practices.EnterpriseLibrary.Data;

using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;

using System.Collections;

using System.Xml.Serialization;

using System.Data.Common;

using Customer;

namespace Customer

{

class Class1

{

public List<Entites> getdata(int id)

{

Database db = DatabaseFactory.CreateDatabase("mycon");

System.Data.Common.DbCommand cmd ;

cmd = db.GetStoredProcCommand("GET_CUSTOMER");

cmd.CommandType = CommandType.StoredProcedure;

db.AddInParameter(cmd,"@CID",System.Data.DbType.Int32,id);

List<Entites> objEntites = new List<Entites>();

using (IDataReader dr = db.ExecuteReader(cmd))

foreach (Entites obj in dr)

{

objEntites.inTest = obj.inTest;-----------------------------------------------ERROR LINE

// objEntites.Add(obj);

}

return objEntites;

}

}

}




Error 2 foreach statement cannot operate on variables of type 'System.Data.IDataReader' because 'System.Data.IDataReader' does not contain a public definition for 'GetEnumerator' D:KOTI_PRJSEnterpriseCustomerClass1.cs 34 13 Customer

View 1 Replies View Related

SQL Server Equivalent For DATE LIKE '%__/Apr/2006%' (was Please Give Me A Hand...)

Apr 10, 2006

I'm happyguy and this is the first time to post my problem. Thanks a lot

here is a SQL query that I know how to write in Oracle, which is

Select * from AttandanceRecord where date like '%__/Apr/2006%'

but, now i'm developing my system with using Ms Sql Server 2000, so I don't know how to write a query with same output as above...

Please, can somebody help me??

View 6 Replies View Related

Superman Retures (2006) Full Movie For Download !

Jan 14, 2007

Edit : spam removed...comments remain


warning
this not advertising or spam. It file I want share you. sorry if , you think it disturbs ,

View 5 Replies View Related

2006-09-13 15:24:18.07 Logon Error: 18456, Severity: 14, State: 16.

Sep 13, 2006

well this is a strange one.



i have a sql 2005 server express running on a pc. it has an xp embedded database on it.

i can connect to it from one pc using component database manager.

however, if i try this from another pc it fails with the following code

2006-09-13 15:24:18.07 Logon Error: 18456, Severity: 14, State: 16.
2006-09-13 15:24:18.07 Logon Login failed for user 'HOSTNAMEGuest'. [CLIENT: XX.XX.XX.XX]
.

i have simple file sharing turned of on the remote pc that fails to connect.

what is my problem.





View 4 Replies View Related







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