ado

SAP DCOM Connector on Windows Server 2008

Does anybody know, if it is possible to use the "old" SAP DCOM Connector on a Windows Server 2008 ? I want to migrate a old ASP Web Solution with DCOM Connection to SAP from Windows 2000 Server to Windows 2008 Server. When I try to install the DCOM Connector I get the Error Message: "Setup could not find ActivX(R) Data Objects verion...

C# Inserting Rows from DataTable to Excel Spreadsheet

Is there a way to add rows from a DataTable to a Excel spreadsheet without interating through a SQL Insert Statement as so? Are there any alternative methods? foreach (DataRow drow in DataTable DT) { cmd.CommandText = "INSERT INTO [LHOME$]([Date], [Owner], [MAKE], [BUY], [OVERAGE], [SUM]) " + "VALUES(" + "'" + drr.ItemArray[0].ToStri...

Entity Framework with XML file as the data source

Is there a way to somehow map an XML file to entities, so that I can use Entity Framework with XML file as the data source. XML file is very similar to a database anyway. ...

Changing cursor type with stored procedure in ASP

Using ASP, I want to call a stored procedure that returns a recordcount. I understand that I have to change the cursor type to adOpenKeyset or adOpenStatic to return a recordcount. What I don't understand is how to modify my vbscript so that it changes the cursor type when calling the procedure. currently I say cm.commandtype = adCmdS...

Possible to access WMI through ADO?

Is there an OLEDB provider for WMI/WBEM? In other words, could someone access WMI through: ADO in shell vbscript ADO in ASP script ADO in Win32 native process SQL Server linked server SQL Server OPENROWSET() Is there an OLEDB provider for WMI/WBEM? Is it possible to access WMI through ADO? i hear rumors that an ODBC driver exist...

How to get the default value of a column of MS Access Database using C++?

This is the sql script I used to create a table in MS Access Database. CREATE TABLE Contracts ( id int NULL DEFAULT 0, sex varchar(255) DEFAULT 'female' NOT NULL ) Now I want to programmatically get the default value of the field: "sex", I know it's 'female' but I don't know how to get it using C++ ADO interface. Below is a snippet ...

SQL Server - two statements on one line??

How to I pass this to SQL Server, it seems to want the "Go 4" on a second line? Insert Into tbl Values (896,0) GO 6 ...

Retrieve ADO Recordset Field names (Classic ASP)

Hi all, I wonder if someone can help: Long story short, I'm using MSSQL2005 to build a Pivot table. The data being examined is limited by date range (All data for 1 week from the nearest Monday to the date selected) When I run the Stored Proc and pass it a date, I get The correct table back eg: Time | 1 Jan 09 | 2 Jan 09 | ...

What is the fastest method for importing from the active sheet in Excel to SQL Server?

What is the fastest way to import data into a SQL Server database directly from the active worksheet in Excel? I have had great success simply looping through the rows and columns, generating a SQL string, opening an ADODB.Connection and executing the SQL. That solution, however, is too slow for large datasets. So I am testing the Jet ...

Requested operation requires an OLE DB Session object... - Connecting Excel to SQL server via ADO

I'm attempting to take Excel 2003 and connect it to SQL Server 2000 to run a few dynamicly generated SQL Queries which ultimately filling certain cells. I'm attempting to do this via VBA via ADO (I've tried 2.8 to 2.0) but I'm getting an error while setting the ActiveConnection variable which is inside the ADODB.Connection object. I ne...

SQL Server 2000, ADO 2.8, VB6

Dear All, How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8 ...

How to get the auto-increment column from a table of MS Access Database using ADO and C++?

I have used the following way to determine if a column is auto-increment: att = Rs1->Fields->GetItem((long)nIndex)->Attributes; bAutoIncrement = att & adFldRowID; But it doesn't work at all. Do anyone have good ideas about this? Thanks in advance. ...

TClientDataSet and big insert

In my application I use TADOQuery with select (MSSQL) and linked with it TClientDataSet. I have to insert about million records and ApplyUpdates. So what I see in the SQL Server Profiler? I see that for each inserted row we have 3 queries: sp_prepare of insert script, sp_execute it with some values and sp_unprepare. I want just to prep...

VBscript and ADO - 3704 Operation is not allowed when the object is closed.

Hi All, This function inserts a row into a SQL database and needs to return the identity number created: Function WriteDatabase(backupTypeID, numImages, folderSize, success, errorMessage, strLogFileName) On Error Resume Next err.clear Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject(...

MS Access. ADO recordset for subform. Child relationship set up programatically. Won't automatically fill in field.

I have a form/subform for inputting data into an ado table. The main form's recordset is a local table of Widgets and information about the widgets (WidgetID, WidgetName, size, color, location, etc). I am inputting test data (multiple tests per widget, all with unique dates) through the subform which is connected to an ADO recordset to...

MFC: Use a MSHFlexGrid with non-database data and still define the shape

I am trying to use the Microsoft Hierarchical FlexGrid (MSHFlexGrid) in a Visual C++ (VS 2005). I have the grid shown, and I can manually add data to the individual cells. However, according to online documentation I've read, I should be able to show the hierarchical nature of the data (hence MSHFlexGrid instead of MSFlexGrid) by defin...

ADO local ports

We have an application that connects to a couple of hundred databases using ADO. Now I know that this may not be the best way of doing things (our customer base has expanded since the application was written) and we are re-writing the application to limit the number of connections. However in the meantime if I look at the ports used on t...

How Can I Sort an ADO Table on a Fieldname Containing a Space?

I am using Delphi, but this is a simple and general problem: I'm doing the following: var ArticlesTable: TADOTable; begin ArticlesTable.DisableControls; ArticlesTable.Sort := 'CITY'; ArticlesTable.First; while not ArticlesTable.Eof do begin ... ArticlesTable.Next; end; This works very well and allows me to effici...

How to pass NULL or empty strings to stored procedure input parameter with ADO and VB?

I have a stored procedure in Sql Server 2005 with a varchar input parameter defined as: @Value varchar(24) = NULL in my VB6 application I try to set the parameter with an ADO funtion: Set prmParamVal = cmdChkParam.CreateParameter(, adVarChar, adParamInput, Len(paramValue), paramValue) If the value I try to pass is an empty (zero le...

Using ADO or OLEDB with ATL

I am writing an class using C++ (ATL).. I need to connect to a database. I am familiar with ADO but I see that all the functions are using IDispatch (late-binding/Automation). I am considering using OLEDB instead. What are the pros and cons of each? OLEDB seems like a lot of maintenance if the sql changes (tables, stored procs, etc). I d...