As you all know, in Framework 2.0 on the desktop platform you have the convenient "abstract" Db* classes that can be used to write more generic code. For instance System.Data.SqlClient.SqlConnection inherits from System.Data.Common.DbConnection, and so forth. Now the docs clearly say that this applies to the corresponding classes in the Compact Framework. And i have seen this implied by other web searchs I've done. However this does not seem to be the case -- or, I'm missing something somewhere.
The following simple code on the desktop platform compiles OK:
using System.Data; using System.Data.Common; using System.Data.SqlClient; DbConnection conn = new SqlConnection();
However it doesn't compile in a compact framework project: "Cannot implicitly convert type 'System.Data.SqlClient.SqlConnection' to 'System.Data.Common.DbConnection'".
Reflector also indicates that the Compact Framework class doesn't inherit from DbConnection.
OK, so am I missing something here, or what was the reason that Microsoft did it differently??
Anyone have a recommendation on SSIS classes (providers and instructors)? It looks like Brian Knight's classes must be at the top of the list. His classes are always full!
I'm still trying to transition from a DB-centric view to an OO view, and I could use some help from any of you OO-design wizards out there. A very common db representation is Table A, Table B, and Table A_B, which maps the two in a one-to-many relation. E.g., create table Companies ( companyId int, name varchar ); create table Products ( productId int, name varchar ); create table Companies_Products ( companyId int, productId int ); So how does this translate into object-land? I started with: public class Product public id as integer public name as string end class public clas Company public id as integer public name as string public products as generic.list(of Product) end class OK, so far, so good -- I've represented most of my data. But I've lost some important information: given a Product object, I have no easy way to find out which company sells it. SQL: scan the Companies_Products table OO: iterate through companies, nested iteration through company.products. Do I just add a function to my data access layer that does the lookup? Is that allowed? On a side note: can anyone recommend a good intro to OO design specifically for database programmers? It seems like most of my confusion comes from issues of translating tables into classes. Thanks!
I am using SQLXML to pass data back and forth, well I am trying to. Itry to follow a tutorial but it didn't work completely. Here is myproblem. After everything executes with NO errors, my class has nodata. Here were my steps.1. In Query Analyzer, I ran my Select statement....Select * From Notifications Where UserID = '4192' and ParentID ISNULL for XML AUTOIt returned...<Notifications ID="1" UserID="4192"CreatedWhen="2004-08-31T00:00:00" ModifiedWhen="2004-08-31T00:00:00"ModifiedBy="1" Class="1" Name="CONSILIUMSOFT" Enabled="1"/>2. I saved the result in Test.xml.3. Ran XSD on it. C:Test>XSD TEST.XMLThis MS utility wrote out the schema file, TEST.XSD4. Ran XSD on it to create the class. C:Test>XSD TEST.XSD /classes/language:csThis MS utility wrote out the CS class file, TEST.cs5. Added the CS file to my project, create a class around it and thecode is below.My problem is that when I put a break point where is says BR (in thecode below), pNotifications has no data in it. All the values areNULL.ANY ideas? I getting desperate....I should mention that I am doingthis in ASP.NET and SQL 2000 sp3Ralph Kraussewww.consiliumsoft.comUse the START button? Then you need CSFastRunII...A new kind of application launcher integrated in the taskbar!ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg************CODE*******************public class CNotifications{SqlXmlCommandobjXMLCommand = newSqlXmlCommand(ConfigurationSettings.AppSettings["XMLConnectionString"]);NotificationspNotifications = new Notifications();public CNotifications(int iID){try{objXMLCommand.RootTag = "Notifications";objXMLCommand.CommandText = @"Select * From Notifications WhereUserID = '" + iID + "' and ParentID IS NULL for XML AUTO";objXMLCommand.CommandType = SqlXmlCommandType.Sql;objXMLCommand.ClientSideXml = true;XmlReader pXMLReader = objXMLCommand.ExecuteXmlReader();XmlSerializer pSerializer = newXmlSerializer(pNotifications.GetType());pNotifications = (Notifications)pSerializer.Deserialize(pXMLReader) ;pXMLReader.Close();}catch (SqlXmlException objEx){objEx.ErrorStream.Position = 0;string strErr = (new StreamReader(objEx.ErrorStream).ReadToEnd());throw new Exception (strErr);}BP}}
I am trying to use VB.NET to run SSIS packages. However I don't have the various dts namespaces available. When I attempt to import them I only have Microsoft.SqlServer.Server in intellisense.
I am running on XP sp2, VS 2005 (full install) and even went so far as to install sql 2005 sp1 full install on my local machine.
What gives with only having Microsoft.SqlServer.Server available?
I show business objects in the ReportViewer as it is described in the MSDN article [1]. In the article they only use intrinsic types like int and string as properties of the business object.
My business objects contains also structs and classes (e.g. Point) as Properties. I expected the Reporting Services to call the ToString() method if it is not an intrinsic type. But it only shows the error string "#Error" in the TextBox.
How can I show a Struct property of my business object as a report value?
[1] MSDN article: "Walkthrough: Using a Business Object Data Source with the ReportViewer Windows Forms Control in Local Processing Mode"
I work on the Clinical Surgery Department Data Application. The patient gets through the Admission, Surgery, PostSurgery and Discharge stages during his staying in the department. The Doctors just insert their medical data in to the different tables. I have three main classes: User, Patient and Portfolio ( patients portfolio ) and all the business bases on these classes. The problem is with the Classes per Medical Data Tables. The Medical tables should exist cause it includes the medical data about the patient however what is not clear: Whether I should create Business and Entity classes per each medical data table ( and this is something like 50 tables ) or I should insert all the functions in the Portfolio class and then there will be a mess of functions in one class? What is the accepted way to perform it ?
All -- Please help. I need to know how to refresh Linq-To-SQL classes after schema changes without dropping and adding them. Now, when I make a schema change (such as add or delete a column to a table), I want to "refresh" the Context.dbml file. The only way that seems to work is to drop the table from the Context.dbml designer and then add it back in. Is there a better way to do this? How are others doing this? Please advise. Thank you. -- Mark Kamoski
Hopefully someone out there will be able to help me with this question. I'm trying to setup my C# program to use the Backup and Restore classes to perform backups and restores on an SQL Express 2005 database.
From the documentation I've read... it seems that when you go to restore the database, it's a good idea to backup the current transaction log. But when I do this using the Backup.SqlBackup method I get an error saying that no database backup is detected so a log backup can't occur. I'm not sure if this has something to do with the fact that I moved my backup files from the default SQL Express/Server Backup folder to a different location. Shouldn't it know I've already performed a backup though?
And does anyone know how to set a parameter to backup to a different file location than the default? I've been doing a backup then a file move. Works the same, but it would be nice to have everything together in the Backup object.
Hello there. I'm developing an eCommerce solutions based on the ASP.NET 2.0 Commerce Starter Kit, architechture. It uses the Provider Pattern. In my web-application, i use the CatalogProvider, to retrieve data from a SQL Server 2005 database. I call the methods through a handler class, whoch excists inside the WebApp. I also use a ShoppingCartProvider, OrdersProvider, ShippingProvider etc. in the same way. In my Web.Config file, i have all the provers listed, and on each provider, the name of the connectionString to use are given. My connection string looks like this:"connString" connectionString="Server=xxxx;Database=xxxx;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> The problem is, that suddently, when browsing the website, that connects to the database through the providers, i get this error: Keyword not supported: ',server'. 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.ArgumentException: Keyword not supported: ',server'.Source Error:
Line 31: public static IDataReader GetProductsByCategory(int categoryID) Line 32: { Line 33: return Commerce.Providers.CatalogProvider.Instance.GetProductsByCategory(categoryID); Line 34: } Line 35: Source File: d:DevelopmentASPNETSeoShopApp_CodeHandlersCatalogManager.cs Line: 33 Stack Trace: If i then go back to my web.config file, and removes the providerName section, of the connectionString, the website works again, for a short period. When the error return, i undo the deletion of the providerName, and it will work again... For a short time... I've also tried to use another connectionsString, like this:Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI But then the keyword which is not supported is: ', data source'
Does anyone know what the issue might be? Thanks in advance...
I receive the following error message when I run a distributed query against a loopback linked server in SQL Server 2005: The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.
To resolve this problem, I was told that running a distributed query against a loopback linked server is not supported in SQL Server 2005. And I am suggested to use a remote server definition (sp_addserver) instead of a linked server definition to resolve this problem. (Although this is only a temporary resolution, which will deprecate in Katmai)
However, I run into another problem when I use the remote server definition. I receive the following error message: Msg 18483, Level 14, State 1, Line 1 Could not connect to server 'ServerNameSQL2005' because '' is not defined as a remote login at the server. Verify that you have specified the correct login name.
Could anyone please help me out? (I include the reproduce steps for the first error message, followed by my resolution that generates the second error message) ====== Reproduce steps for the first error message ======
On the ComputerAInstanceA instance, run the following statement to create a database and a table: CREATE DATABASE DatabaseA GO USE DatabaseA GO CREATE TABLE TestTable(Col1 int, Col2 varchar(50)) GO INSERT INTO TestTable VALUES (1, 'Hello World') GO
On the ComputerBInstanceB instance, run the following statement to create a database and a table: CREATE DATABASE DatabaseB GO USE DatabaseB GO CREATE TABLE TestTable (Col1 int, Col2 varchar(50)) GO
On the ComputerAInstanceA instance, create a linked server that links to the ComputerBInstanceB instance. Assume the name of the linked server is LNK_ServerB.
On the ComputerBInstanceB instance, create a linked server that links to the ComputerAInstanceA instance. Assume the name of the linked server is LNK_ServerA.
On the ComputerBInstanceB instance, run the following statement: USE DatabaseB GO CREATE PROCEDURE InsertA AS BEGIN SELECT * from LNK_ServerA.DatabaseA.dbo.TestTable END GO
On the ComputerAInstanceA instance, run the following statement: USE DatabaseA GO INSERT INTO TestTable EXEC LNK_ServerB.DatabaseB.dbo.InsertA GO Then I receive the first error message.
======= My resolution that generates the second error message =======
On the ComputerBInstanceB instance, run the following statement: sp_addserver 'ComputerAInstanceA' GO sp_serveroption 'ComputerAInstanceA', 'Data Access', 'TRUE' GO USE DatabaseB GO CREATE PROCEDURE InsertA AS BEGIN SELECT * FROM [ComputerAInstanceA].DatabaseA.dbo.TestTable END GO
On the ComputerAInstanceA instance, run the following statement: USE DatabaseA GO INSERT INTO TestTable EXECUTE [ComputerBInstanceB].[DatabaseB].[dbo].[InsertA] GO Then I receive the second error message.
I have looked all over the MS site and can find very little information regarding SQL Server's support for the VMWare environment. Based on other information that I have obtained on other forums and web-site it looks like it is not supported by Microsoft, but I would like the company line if possible.
I've been using full-text for quite some time, but I switched to another product for quite some time. The reason is that microsoft full-text doesn't offer the feature where one can get a resultset of page x out of y pages, i.e: give me top 100 matches of page 125 out of 5000 pages. I disappointedly waited for SQL Server 2005 and now it doesn't seem to support in sql server 2008 full-text search either. I had to get all 5000 pages of data, then jumped to page 125 to get just 100 records of that page--had to go get a coffee and came back for a 2+ millions rows table. Customers want the result in a split of a second.
Anyone knows if the final version of sql server 2008 will have better support for paging and getting top x rows? I scanned through 2008 BOL and didn't see any change from sql server 2005 or even sql server 2000 full-text search. (one improvement in sql server 2005 over sql server 2000 was the speed of populating large catalog and multiple languages support)
Hi All, Can you please kindly let me know whether DAC(Dedicated Administration Connection) is supported in SQL Server 2005 Express Edition. As per the documentation available in MSDN(Trace Flags), Trace Flag
7806 Enables a dedicated administrator connection (DAC) on SQL Server Express. By default, no DAC resources are reserved on SQL Server Express.
But when i tried to enable it by passing -T7806 as a parameter to SQL Server (SQL Express) service, the following information is logged into event viewer
Dedicated administrator connection support was not started because it is not available on this edition of SQL Server. This is an informational message only. No user action is required.
Also, the following error message is displayed when I tried to connect to DAC from command prompt
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: 43 - An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for the port number) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
The version of SQL Server I'm using is
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )
Can someone kindly me help me to enable DAC of SQL Express edition?
A application using Sql Server 7 is developed under WinNT(Win2000, WinXp) . Now want to transfer this application into Vista OS. When install MSDEx86.exe, "SQL Server7 is not compatible with Vista" was warned. When do such kind of transfer, what kind of software related to Sql Server is required? And is it necessary to modify the code of application?
I was told that AES 128/SHA1 is supported for SQL Server Compact 3.5. The problem is that I couldn't find any product literature from Microsoft that specifies exactly that and my client wants us to provide proof on that.
I hope to get the endorsement from the forum here, and it would be great if someone could point me to some Microsoft resources that specifies the support clearly.
Hello All, I am in the process of upgrading my current database in SQL Server 2000 to SQL Server 2005. I have finished my analysis using the upgrade advisor and have found a lot of SPs having upgrade related issues. From what I estimate I think it will take around 3-4 weeks to resolve all of those issues. I wanted a quicker way to upgrade my database since we have very little time for the final release. The main reason for upgrade to 2005 was use of new features like Database Mirroring and/or peer to peer replication alongwith the Partitioning features and the new T-SQL enhancements.
The question I wanted to ask was does the compatibility level 80 of SQL Server 2005 supports these new features. From what I have read on the KB article at http://support.microsoft.com/kb/822400 is that mirroring is supported in any compatibility level, but there is no specific mention on the peer to peer thing. Also when I personally tried using the New Partitioning Features of 2005 on the database having compatibility 80, it worked fine. Also other features like SQLCLR and TRY...CATCH works fine. One thing I observed was that new T-SQL statements like PIVOT/UNPIVOT is not supported
It will be nice if someone can give out the entire list of features that will be supported in the compatibility Level 80 and also the list of the ones that are not supported.
I've run into a bit of a database connection problem. I'm trying to connect to a SQL Server database. It compiles okay, but then while IE is loading, I get an exception error pointing out in the code saying 'Keyword not supported: 'provider'.
Please can someone give me a url or even their own list of support / unsupported components in SQL server 2005 Standard edition.
I know fuzzy lookup is not supported. Is a slowly changing dimension supported?
Its a bit difficult to tell when I get bizzare "Product level is insufficient" error for even a basic derived column transformation when executing a package using SSIS unless it is executed using a scheduled job....
While I try to configure replication getting below error message:SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, "servername". (Replication.Utilities)
Note: SQL server instance names shows different in sql server configuration manager and SSMS sql server instance name in configuration manager: 2di3100sqlserverprod ,but i run the query in SSMS SELECT @@SERVERNAME it shows: 2di3100plugin.
Hi all,At this moment I'm trying to get database mail working. According tosome people it should be easy. Well...that is not the case for me.I'm having the following error:The mail could not be sent to the recipients because of the mail serverfailure. (Sending Mail using Account 2 (2006-11-24T08:48:15). ExceptionMessage: Cannot send mails to mail server. (Command not implemented.The server response was: Command not Supported).)SQL Server 2005 is installed on a separate server and the SMTP Serveris Lotus Notes. connecting with port 25.Start and stopping the SQL Server and SQL Server agent i tried already.i tried sysmail_stop_sp and sysmail_start_sp.Sometimes when starting or stopping the Mail with the followingcommands :exec sysmail_stop_spGOexec sysmail_start_spGOI will get the following error:Msg 233, Level 20, State 0, Line 0A transport-level error has occurred when sending the request to theserver. (provider: Shared Memory Provider, error: 0 - No process is onthe other end of the pipe.)So any help would be appreciated.Hennie
I have recently upgraded from SQL 2000 to SQL 2005 and I'm getting the following problem, can you suggest me if this is a issue with SQL 2005 or suggest me an asnwer for this.
Below is the exception from my log file
The cursor type/concurrency combination is not supported. com.microsoft.sqlserver.jdbc.SQLServerException: The cursor type/concurrency combination is not supported. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.<init>(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.<init>(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(Unknown Source)
The following is the piece of code where the problem I'm assuming is happening, how can I correct it.
I got the following exception from the code listed below:
System.Web.Services.Protocols.SoapException occurred Message="The operation is not supported on a report server that is configured to run in SharePoint integrated mode. ---> The operation is not supported on a report server that is configured to run in SharePoint integrated mode." Source="System.Web.Services" Actor="http://haileizws32b:8080/ReportServer/ReportService2005.asmx" Lang="" Node="http://haileizws32b:8080/ReportServer/ReportService2005.asmx" Role="" StackTrace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Microsoft.PerformancePoint.Planning.Client.Common.ReportServer.ReportingServices2005.ListChildren(String Item, Boolean Recursive) in c:Officedev14ppsplanningclientCommonReportingServices2005.cs:line 1001 at Microsoft.PerformancePoint.Planning.Client.Common.DataAgent.RetrieveDirectoryStructureFromReportingServices(Object caller, Object parameters) in c:Officedev14ppsplanningclientCommonAgentsDataAgent.cs:line 2027 InnerException:
The code is like:
ReportingServices2005 reportingServices = new ReportingServices2005();
Hello,I'm trying to install the SQL Server 2005 Standard edition and while I can easily install the first part of the package, the document.write(L_LINK_RUNINSTALL_VAR_TEXT) Server components, tools, Books Online, and samples, when I click to install the Run the SQL Native Client Installation Wizard it tells me this:This Microsoft sql server native client package is not supported on the current processor type I have Windows XP64bit with IIS running on 32bit now. Why does it do that and how I can get around it ? :) Thanks.
fix the below SP which is having cursor output with an alternate logic which can make the SP work.(may be using temp table or any other option)
CREATE PROCEDURE Get_IDS /* * SSMA warning messages: * O2SS0356: Conversion from NUMBER datatype can cause data loss. */ @p_uid float(53), @return_value_argument varchar(8000) OUTPUT
I've downloaded SQL Server Express with Advanced Services from http://msdn.microsoft.com/vstudio/express/sql/download/ and installed all components. When I try to create a full-text catalog, I get the following message:
No full-text supported languages found.
select * from sys.fulltext_languages returns no lines.
How can neutral, English or maybe Hungarian word breakers be installed?
Hi My project is in .NET 2003 i.e. framework 1.1 and database in SQLServer 2000. But the reports have been developed using SQLServer 2005 Reporting Services. Now when I am trying to deploy them through deployment project of .NET its giving me following error:"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services. Now I am really confused with this. Can any one please guide me regarding this ASAP. Thanks, Falguni