ado

Issue with the 'AspCompat' attribute

One of my client's website (I didn't code it) was migrated to a new server yesterday by his host. All this aspx code that uses the aspcompat attribute now bombs - <%@ Page Language="VB" AspCompat="true" %> 'Next we need to create a database connection object on the server using the ADO Database connection object. 'Create an ADO connecti...

Are there restricted characters in ADO varchars?

We have a simple file browser on our intranet, built using ASP/vbscript. The files are read by the script and added to an ADO Recordset (not connected to a database), so we can sort the contents easily: Set oFolderContents = oFolder.Files Set rsf = Server.CreateObject("ADODB.Recordset") rsf.Fields.Append "name", adVarChar, 255 r...

ADO.NET - What is best practice for getting datareader values?

Just wondering what is best practice for getting the values of a datareader. For example: I have been doing this: MyValue = Dr("ColumnName") But have noticed other people doing: MyValue = Dr.GetString("ColumnName") I am intested to know the benifits of the 2nd method ...

Running Access QueryDefs from VBA in Word

I'm creating parameterized queries in Access and would like to call them from ADO code in a VBA module in Word. I'm not sure of the syntax, however, to call parameterized queries. Can't seem to find a good code reference online. If I have qryGetRecordByFirstLast that accepts Firstname and Lastname as parms, how do I code this execute in...

How can I change SQL data order from rows to columns?

I have a snippet of code that writes the data alphabetically from a database ACROSS 3 columns on a web page. Example: a result b result c result d result e result f result g result h result i result I need instead to display it alphabetically DOWN the columns, like this: a result d result g result b result e result ...

automatically query and convert access db table to excel using vbs

I have an Access database. I would like to automatically query the table Data_01 and export the results to an Excel spreadsheet using ADO in VBScript on a daily basis. At present my skills in ADO are lacking. I have a date time column that I would select items from yesterday and today. In a GUI query the criteria would be Between Date(...

Changing the precision of fields for xml export with ado object with the 'save' method

Hello, I am working on a VB6 application that uses an ADODB.Recordset object to dump data to an .xml file with the 'save' method, like the following: adoRecordset.Save strDst, adPersistXML where strDst is a string describing the destination. Now, there are some rows in the database that are floats/doubles, for some table. For exampl...

How can I do this in Delphi?

I am converting an application from BDE to ADO. Under the BDE, if a query was Open and you called "Sql.Clear", it would automatically close the dataset. However, this is not the case under TADOQuery, where it will raise an exception "Operation cannot be performed on a closed dataset". A lot of our legacy code relies on the old BDE beh...

Problem Inserting data into MS Access database using ADO via Python

[Edit 2: More information and debugging in answer below...] I'm writing a python script to export MS Access databases into a series of text files to allow for more meaningful version control (I know - why Access? Why aren't I using existing solutions? Let's just say the restrictions aren't of a technical nature). I've successfully expo...

SQL Query Run Against Excel Workbook Returns Truncated Text Field

Hello - I'm running a SQL SELECT query through an ADO connection to an Excel 2007 workbook with the following code (using a custom version of VBScript) dim ado, rs set ado = CreateObject("ADODB.Connection") ado.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=workbook.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES;IM...

Why do I keep getting "Must declare the Scalar variable "@Param1"" when performing a parameterized query in C++ using ADO?

Here is the code. A Few notes about it. DStr is an string class that is internal to our company. It functions much like CString. I can connect to the database and run non-parameterized queries. Also this insert works fine if I do not use parameters. The cmd->Execute statment throws an exception. This is where I am getting the error...

Using data compression in communication between application and database?

Hi there, I have upcoming project where we need application to send data on compressed into database and to other application. The compression can use algorithm such as GZIP or ZLIB. Can somebody point me some help, especially for VCL component (or ActiveX) that can compress data traffic between communicating application and database? ...

How Do You Call an MSSQL System Function From ADO/C++?

...specifically, the fn_listextendedproperty system function in MSSQL 2005. I have added an Extended Property to my database object, named 'schemaVersion'. In my MSVC application, using ADO, I need to determine if that Extended Property exists and, if it does, return the string value out of it. Here is the T-SQL code that does what I ...

Asp.Net select in Sql

This is going to be very simple I know. I have seen so many different ways of using sql in asp.net with no real standard. What I want to know is how to cleanly select from an sql database in asp.net and retrieve multiple records. For example: select all userids. String sql = "SELECT [UserId] FROM [UserProfiles] WHERE NOT [UserId] = '...

How to use Stored Procedures w/ ASP.NET DataGrid

Question can also be: What is your preferred way of invoking stored procedures to fill a DataGrid? I am currently developing an ASP.NET Page, and I would like to know if Linq is the right way to go for use with my SQL Server DB. ADO seems nice too, so I would just like to have feedback on what is the most appropriate in general terms...

VB6 ADO Set rs=command.Execute

Set rs = command.Execute if not rs.EOF then 'logic here end if The above code fails at line 2, because rs is closed(probably the oledb provider figured out, wrongly, that it is an insert command so no need to return anything). The command is an insert statement something like: Insert into log(Name,Value) values("xxx", 123); select...

What's the smallest footprint necessary to use an unmanaged Oracle provider?

I'm working on an application written in .NET. We are currently using ODP.NET 11's xcopy deployment for all of our .NET operations and everything is peachy - we can run on machines with no Oracle client previously installed. Peachy, that is, until we came to the part of the application which depends on a library written in COM, which o...

Manupulating Excel files from Windows Scripting Host

Is there a fast way to manipulate the contents of an existing XLS file from Windows Scripting Host? We have Excel templates we received from a customer. Our task is to fill these templates with the data we fetch from an Oracle database. The current approach is to use Windows Scripting Host and VBScript: Get data from Oracle using ADO...

Using Autonumbering in Access - INSERT statements

I'm having trouble running an INSERT statement where there's an autonumber as the PK field. I have an Auto-incrementing long as the Primary Key, and then 4 fields of type double; and yet Access (using ADO) seems to want five values for the insert statement. INSERT INTO [MY_TABLE] VALUES (1.0, 2.0, 3.0, 4.0); >> Error: Number of query va...

Differences between ado and bde

What is the Differences between ado and bde? ...