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


ADVERTISEMENT

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

Data Access Application Block: Using In Class Library

Nov 16, 2007

I'm trying to use the Data Access Application block, and am having some issues with configuration. I am using it in a class library, and it seems that with v 3 you need to configure the DAAB first, making changes to the configuration file. However, in a class library, I do not seem to have the web.config or app.config file to change. So where do I need to store the configuration settings?
 Thanks,
Paul

View 3 Replies View Related

How To Specify Failover Using Enterprise Library Data Access Block

Jan 16, 2008

We are expanding an application's database hardware to have a mirrored failover server. Normally in this case we just have the application add "Failover Partner=MirredServerName" in the connection string.

However, this application is using the Enterprise Library Data Access Block and we can't find any documentation describing how to setup the Failover Partner using this library. Any help would be appreciated.

JOHNF

View 3 Replies View Related

SQLCLR +Enterprise Library Data Access And Service Broker Internal Activation

Mar 10, 2007

I am trying to find a solution to my woes creating CLR activation stored procedure that references Enterprise library data access dlls. Does anyone know best practices to deploy .NET 2.0 assemblies as SQLCLR. I am using VS2005 SqlClrProject to deploy my .NET 2.0 assemblies to Sql Server and it fails with error such as "Assembly was not found in the sql catalog". If I manually try to load a referenced assembly within SqlServer by browsing to the target location, like for example, System.Management.dll it fails with similar error, trying to resolve its dependencies. Even if I manage to walk through the dependency tree and resolve it to the final dependent dll, I am only able to load it in "UNSAFE" mode. Any recommendations, suggestions and feedback are welcome.



Thanks in advance.

View 4 Replies View Related

Connection Pool Limit Reached !! Please Help ! (Using Enterprise Library Data Access Application Block)

Apr 22, 2008

This is my code...
public partial class test : System.Web.UI.Page
{protected void Page_Load(object sender, EventArgs e)
{SqlDatabase database = (SqlDatabase)DatabaseFactory.CreateDatabase("ConnectionString");DbCommand command = database.GetSqlStringCommand("SELECT UserName FROM Users WHERE UserID = '6264'");
 using (IDataReader reader = database.ExecuteReader(command))
{if (reader.Read())
{lblTest.Text = "test";
}
}
}
}
 
 
This is my error:
Server Error in '/' Application.


Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.Source Error:



Line 21: //DbCommand command = database.GetStoredProcCommand("CorrUsers_GetByUserId_s");
Line 22: DbCommand command = database.GetSqlStringCommand("SELECT UserName FROM Users WHERE UserID = '6264'");
Line 23: database.ExecuteReader(command);
Line 24: using (IDataReader reader = database.ExecuteReader(command))
Line 25: {Source File: d:webwwwrootchacha078dev.cha.toplingo.com est.aspx.cs    Line: 23 Stack Trace:



[InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.]
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +1261381
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection() +195
Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection) +106
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) +62
test.Page_Load(Object sender, EventArgs e) in d:webwwwrootchacha078dev.cha.toplingo.com est.aspx.cs:23
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Any help with this matter would be very much appreciated.
 Thank you for your time.
 Sincerely,
 Jeffrey Pham

View 3 Replies View Related

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

Please Help With Data Mining Add-ins For Office 2007 - CTP December 2006

Jan 12, 2007

I am running the Office Professional Plus 2007 RTM with all options enabled and SQL 2005 Enterprise Edition. Based on the system requirements listed on the download page for the Office 2007 Data Mining Add-In, I've also verified that I have the correct CTP of SQL 2005 SP2 and that .Net 2.0 Framework is installed. Finally, I've verified that my local instance of SQL Server is configured correctly to allow temporary data mining models.

In Excel, all of the Table Analysis tools seem to work fine, and most of the options on the Data Mining ribbon also work; however, all of the options under "Data Modeling" on the Data Mining ribbon return the following error when I try to use them:

"Could not load file or assembly 'Microsoft.DataWarehouse, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependents. The system cannot find the file specified."

Please help. Thanks.

View 4 Replies View Related

XML Request (send) And XML Response (receive) Data Thru BIZTALK 2006.

Oct 2, 2007

I am new to BIZTALK 2006; Please help me get started as below>>
I have XML Request (send) and XML Response (receive) data;
What are the steps needed for this to be accomplished in BizTalk to create webservice for this?
THX

View 3 Replies View Related

DB Engine :: How To Release TempDB Space After Data / Batch Loads

Apr 22, 2015

I have scenario where I have process that loades data into SQL server 2012 database by doing some manipulation on data like sorting , aggregation, etc. Once this process is completed it's not free up the Tempdb space.  If I restart the database, then it does.

is there any way (apart from shirking) to release space for Tempdb, like writing some post SQL queries to delete/ truncate the data and logs from temp db?

View 8 Replies View Related

Analysis :: Creating Data Connection Library In SharePoint 2013

May 5, 2015

I am trying to create a Data Connection Library linking an SQL Database to SP2013.  I have been unable to locate instruction or where in SP Central Administration to create the library.  The option to Create Data Connection is not available.I am creating an InfoPath form to create-read-write-update data in the SQL database.

View 2 Replies View Related

Reporting Services :: Setting Data From Custom Library Not Working In SSRS

Sep 22, 2015

I have a SSRS report that uses a custom library. The custom library returns a string values, and I have tested this with a windows application.In the SSRS report. I have set the expression value for a text box as  =CodeReportingLibrary.CodeReportingFunctions.GetImage(1232)

However, when i preview the report the text box value shows as #ERROR. I checked the error list and I get a warning message : Warning 1 [rsRuntime ErrorIn Expression] The Value expression for the textrun ‘Textbox5.Paragraphs[0].TextRuns[0]’ contains an error: Attempt by security transparent method 'CodeReportingLibrary.CodeReportingFunctions.GetReferenceImage(Int32)' to access security critical method 'Microsoft. TeamFoundation. Client. TfsTeamProjectCollection..ctor(System.Uri)' failed.  Assembly 'CodeReportingLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself.  In order to access security critical code, this assembly must be fully trusted.

I have updated the rssrvpolicy.config in ReportServer folder, to include my custom dll.

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CoDeMagSample"
Description="CoDe Magazine Sample. ">

[code]....

View 4 Replies View Related

Manage A Data Source For A Report Found In A SharePoint Document Library

Jan 18, 2007

I was working for 2 days on integrating reporting services with MOSS 2007.



The problem i faces was to create a data source for the
uploaded report (Not created using a wizard ) that will connect
me to the SQL server.



As i clicked on the arrow near the uploaded report to manage the data source, i found no

data source for this item.



I would be pleased to know the howto create this data source and where.



Best Regards,



Lana

View 4 Replies View Related

Data Access :: MS Access ADODB Connection To Stored Procedure - Cannot Retrieve Data

Sep 22, 2015

I'm trying to re-write my database to de-couple the interface (MS Access) from the SQL Backend.  As a result, I'm going to write a number of Stored Procedures to replace the MS Access code.  My first attempt worked on a small sample, however, trying to move this on to a real table hasn't worked (I've amended the SP and code to try and get it to work on 2 fields, rather than the full 20 plus).It works in SQL Management console (supply a Client ID, it returns all the client details), but does not return anything (recordset closed) when trying to access via VBA code.The Stored procedure is:-

USE [VMSProd]
GO
/****** Object: StoredProcedure [Clients].[vms_Get_Specified_Client] Script Date: 22/09/2015 16:29:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON

[code]....

View 4 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

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

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

Data Access :: Management Studio To Access Data On Laptop?

Jun 30, 2015

I have a client who has SSMS installed on her laptop.  She is able to connect to the SQL server via SSMS in the office and query data on the server.

She needs to be out of site often and doesn't have internet access.  She asks if the data tables can be "backed up" or saved on her laptop, so she can look at them without worrying connecting to the server.  I am not sure if this can be achieved, as SSMS is built for accessing a server, not a desktop.  Myself never have this need.  If I really need it, I would go to Microsoft Access and create an ODBC connection to the datatables. But this client thinks that Microsoft Access is beneath her. 

View 4 Replies View Related

Data Access :: Data Import From Password Protected Access MDB

Jul 20, 2015

HowTo: Import data to MS SQL 2008 from password protected Access DB ?

View 2 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

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 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

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

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

SQL Reporting Services Using Project Portfolio Server 2006

Aug 25, 2007

Can someone assist? I'm using the applciation Project Portfolio Server 2006. Have reporting services setup and when I try to create a custom report this is the error I receive:


The report server cannot process the report. The data source connection information has been deleted. More Info: http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInvalidDataSourceReference&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.2047.00


Also does anyone know of a good location for information on troubleshooting Project Portfolio Server 2006? Can't find much good documentation.

Thanks, Julie

View 1 Replies View Related







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