bagjuice's Q&A profile
.NET Development Read Excel error in x64 server
I have a project that use oledb to read a excel file. The code is like that(C#): string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + excelFile + ";" + "Extended Properties=\"Excel 8.0;HDR=YES\""; OleDbConnection conn = new OleDbConnection(connString); ... conn.Open(); But it seems not work on the 64bit machine, it showed me " The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. " Can someone help me with the issue But I did compile the project in x86 enviroment, it doesn't work on the x64 machine. I have a question : for there is not 64-bit oledb drivers, what can we use to connect excel ...Show All
SQL Server Excel formatting - currency & percentages
Hi fellas, this is another one of those "RS to Excel formatting" questions :) I have reports with a large number of columns containing either percentages or currency figures. These numbers show up in Excel with the General format - how can i get Excel to recognise them for what they are I preferably want to keep the $ and % signs included, as it makes the report a lot easier to read if they are retained, so formatting the numbers as decimals etc. (as other answers have suggested) is probably a last resort. As a related question, is it possible to write a custom filter or renderer that can be inserted between RS and Excel Thanks for any answers/ideas! sluggy Thanks for the ans ...Show All
Visual Basic Addhandler cause error even the event signature is the same
Hi, I was a VB6 user and kind of new in delegate. I try to create a delegated sub that will validate all the controls bind with the bindingsource. Somehow, myValidating at the addhander procedure will be underlined and said "...cannot be converted to system.componentmodel.CancelEventHandler". I can't figure out the reason. Appreciate for any suggestion... Here is my code. Delegate Sub CustomValidating( ByVal sender As Object , ByVal e As System.ComponentModel.CancelEventArgs) Private Sub SetupValidation( ByVal _bindingsource As BindingSource, ByVal myValidating As CustomValidating) For Each b As Binding In _bindingsource.CurrencyManager.Bindings AddHandler b.Control.Validating, my ...Show All
SQL Server DTS package "Index Not Found Error"
The Scenario is we have a development machine that is actually a virtual machine and we have a test server. Virtual machine is XP professional based machine and Test Server is Windows Server 2003 based machine. We have created a DTS package in Sql Server 2000 which copies data from 7 foxpro .dbf files to Sql Server 2000 based Database. This package when we test at our Development machine(Virtual Machine) works very fine, but when same DTS package is executed at Test Server it gives an Error, Below is the error which we found in DTS Logs. Package failed because Step 'DTSStep_DTSDataPumpTask_1' failed. ************************************************************************** Step Error Source: Microsoft JET Database Engine Step Error Des ...Show All
SQL Server How to get the resulting XmlaWarningCollection in AMO Process?
Hi, I'm trying to do an unattended cube processing using AMO, and I simply want to let the user know that warnings and errors occurred (and how many of them) without necessarily stopping the process. Looking at the Cube.Process method overloads, you'll find out that it is possible to pass an XmlaWarningCollection that, allegedly, should return a warning collection populated with them. When coding that, the collection is always returned as an empty one (0 items). Again, I'm suspicious that only warnings are allowed and not XmlaError objects or generic XmlaMessages, guessing that I'm misunderstanding the issue. Alternative methods, like subscribing to a Trace looks overkill due to the roundtrips involved. Saving to a log file and ...Show All
Smart Device Development Building a PDA application, which to choose visual: c# or c++
Hello everyone, I am interested in building a series of applications for a Windows Mobile 2003 SE device. What would be the best language to do it under Visual C++ or C# The application I plan to write essentially sends a command and receives data from a serial device. I've already written this program in the LabVIEW programming language, but it is too slow. (i.e. to complete one loop in the code takes ~2-3 minutes). Any advice would be greatly appreciated. -George well it depends on your device. Some PPC WM2003 devices are supported I believe, but with the .NET CF 2.0 SP1 you can install it on Windows CE 4.1 or higher however it is almost guarenteed to be supported by majority of devices running WM ...Show All
Visual Studio Team System TFS SP1 on SQL Cluster Failing
Hi, Has anyone successfully install TFS SP1 where the TFS DT in on a clustered SQL Server I had the Beta SP1 installed and successfully removed it from the DT, but when I go to install the RTM SP1, the install is hanging on quiescing the databases (as part of KB919156). I’ve enabled verbose logging and the only thing that shows up in the log is that the DB quiesce begins (12/25/06 09:05:38 DDSet_Status: Commandline: "C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\TFSQuiesce.exe" /n:"Quiesce DT") and then never completes. I’m fairly certain this is related to the fact that SQL is clustered, but have been unable to find any articles or blogs that address this scenario. ...Show All
SQL Server SQL Server 2005 JDBC Driver Output Parameter/Result Set issue
I'm having an issue with the JDBC driver when I execute a stored procedure that both has a return value and also returns a result set. If I attempt to retrieve the return value (registered as an output parameter) after I execute the stored procedure, then any subsequent attempts to retrieve the result set always return null. Is this by design If I use the result set first and then later get the return value that works; however, in my situation I need to first check the return value before I work on the result set. Am I'm I doing something wrong Code: CallableStatement cs = connection.prepareCall("{ = call spGetCustomer( , ) }"); cs.registerOutputParameter(1, Types.INTEGER); cs.setString(2,"blahblahblah"); cs.setB ...Show All
SQL Server Merge Replication Mysteriously Deleting Rows
I am running a simple merge replication in SQL Server 2000. I have one database that is the publisher, and a second database that is the subscriber. When I add a new row to the subscriber it will replicate to the publisher as expected. However, the new row at the subscriber will then be deleted without explanation. The row will remain at the publisher though. Does anyone know why it is doing this I think I have solved the problem. When I setup the horizontal filtering, it automatically extended some of the filters and created join filters. When I removed the join filters, the rows stopped being deleted. I will need to create some join filters to ensure that the subscriber only gets the data it need ...Show All
Visual Studio Express Editions Cant open existing project
Hi, I am trying to open projects which were created and built successfully in the VC++ EE but they dont seem to open. There is no change in the installed software its the same one used for creating those projects in the first place. Pl help. Thanks Hunt Hi, I dont know about other machines but there is something wrong either with the software or my understanding. How do we open existing projects or are they now part of solutions and should be opened as such or what is it thanks. ...Show All
Visual C# Using private constructors in embedded classes
Hi. I have a pretty simple question, though I don't know if it has a simple answer: I would like to define a class-within-a-class such that the embedded class can only be created by the outer class, but once created can be accessed publicly (similar to a factory pattern): class A { public class B { private B() { ... } } public B CreateB() { return new B(); } } This doesn't work as written, I get A.B.B() is inaccessible due to its protection level, and I get "inconsistent accessibility" errors with any other configuration I try. Is there some other protection level that will allow B.B() to be accessible to A, but not to anything outside of A Also, I'm not super clear on this "inconsistent accessibility" co ...Show All
Windows Forms DataGridView column filled from lookup table column
I have two tables Company and Status. Company has a foreign key into Status – Status is the lookup table with two columns: ID and StatusName. I need to build a DGV that will provide a read-only list of what is the Company table, plus the StatusName for each record. All DGV columns are read-only textboxes. The Dataset already holds both tables, but not the relationship between them. The DGV columns are already set up to show records of the Company table but the Status column only shows the numeric foreign key value. Any chance I can do this without a database View or a stored procedure Here’s a bit of code. bindingSource1->DataSource=dataSet1->Tables-> default ...Show All
SQL Server Textbox Properties Format Code = to General Format in Excel?
When I export a report to Excel I need most of the fields to be the general format of Excel which is what in the format properties of Reporting Services Reports I tried Default and that doesnt seem to be it either. According to Excel the General format cells have no specific number format. Any ideas would be wonderful! Thanks so much! Stokh :) That is what I thought! Shucks! I will work around it I already hacked the spreadsheet password so I just need to get into my version and then she will have to cut and paste it into her version to ftp to their system I guess. Thanks so much you answered my questions as always! :) Stokh ...Show All
Windows Forms Hosting Form Designer + Creating a TabControl with no TabPages
Hi, I have an application where I'm hosting the Windows Form Designer, and when I add a TabControl, it is created with two TabPages. I've tried using control.TabPages.Clear() after it's created, but this doesn't seem to clear the TabPages before they are created. Ideally what I'd like to do is have a TabControl created empty, and then allow the user to drag TabPages from the toolbox onto the TabControl. Has anyone else had this problem before Thanks The designer class TabControlDesigner automatically creates two tab pages inside the InitializeNewComponent override. Unfortunately the designer class is marked as internal and so you cannot derive from it and just override the method to prevent that from occ ...Show All
.NET Development Enlisting an Oracle database connection throws an AccessViolationException
Hi, I use .NET 2.0, Oracle Express Edition 10g Release 2 (10.2.0.1), and System.Data.OracleClient. I wrote a resource manager that implements System.Transactions.IEnlistmentNotification. The resource manager itself is enlisted as a volatile resource in Transaction.Current using Transaction.Current.EnlistVolatile(resourceManager, EnlistmentOptions.EnlistDuringPrepareRequired); Within IEnlistmentNotification.Prepare I want to enlist a new database connection. If I resolve the data source in my connection string I get an AccessViolationException: "An unhandled exception of type 'System.AccessViolationException' occurred in System.Data.OracleClient.dll Additional information: Attempted to read or write protected memory. Th ...Show All
