Questions tagged [adodb]

ActiveX Data Objects, a Microsoft middleware for accessing data sources. Allows to access data from various languages without knowing how the database is implemented. Successor of RDO (Remote Data Objects) and DAO (Data Access Objects), first introduced in 1996.

1825 questions
7
votes
4 answers

"Invalid use of Null" when using Str() with a Null Recordset field, but Str(Null) works fine

I'm banging my head against the wall on this one. I was looking at some old database reporting code written in VB6 and came across this line (the code is moving data from a "source" database into a reporting database): rsTarget!VehYear =…
Mike Spross
  • 7,999
  • 6
  • 49
  • 75
7
votes
2 answers

sql join on string = integer to work on any RDBMS

I need to join two tables on column, which in one table is defined as string and in other as integer. In both columns actual data stored is integers. This is given to me by design - I can't change this. So when I do join MySQL is fine - it does…
aavagyan
  • 73
  • 1
  • 1
  • 4
7
votes
2 answers

Reading and working with strings longer than 255 with ADODB Excel 2010 VBA

Here' a thing for you guys: I want to read information from from a closed workbook using ADODB in VBA EXCEL. It happens that the strings in the cells in excel sometimes are with a length bigger than 255. And then here is this limitation:…
Martin Patsov
  • 366
  • 5
  • 10
7
votes
2 answers

How to set "Application Name" in ADODB connection string

In .NET I simply use Application Name = MyApp inside the connection string, but when using ADO connection through VBA the Activity Monitor of the SQL Server Management Studio always shows Microsoft Office 2010 in Processes on the Application column…
SysDragon
  • 9,692
  • 15
  • 60
  • 89
7
votes
1 answer

Calling SQL Stored Procedure with Output Parameter in VBScript

I've written a VBScript function to call a stored procedure. In the past, I've written a number of functions calling stored procedures with input parameters, but in this instance, I need to work with an Output parameter. In another application, I…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
6
votes
1 answer

Adding TEXT parameters to ADODB.Command without using stored procedures

I need to perform INSERTs on a SQL Server 2008 table with some TEXT columns, and I can't have the ADODB.Command parameter for the TEXT column working. The table is defined as: CREATE TABLE dbo.Test ( TestId INT NOT NULL IDENTITY(1, 1) ,…
Albireo
  • 10,977
  • 13
  • 62
  • 96
6
votes
1 answer

Use Table name in SQL query in VBA Excel

Below is the excel table i want to manipulate via SQL query in VBA. Please find my VBA code. Sub SQL() Dim cn As ADODB.Connection Dim rs As ADODB.Recordset strFile = ThisWorkbook.FullName strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="…
sagar
  • 397
  • 10
  • 25
6
votes
2 answers

Rare Incident when setting dates range in where of a query of MySql?

I'm programming Classic ASP against a MySql Database connecting with ADODB and MySQL ODBC 5.3 ANSI Driver, but I have some problems when setting the date in the where of a simple MySql query, when my query is: Select * from cdr where…
Artemination
  • 703
  • 2
  • 10
  • 30
6
votes
1 answer

Return a value and a result set from stored procedure classic asp

I want to get both a return code and a result set back from a stored procedure in classic ASP. CREATE PROCEDURE CheckEmployeeId @EmployeeName nvarchar(255) AS BEGIN SET NOCOUNT ON; DECLARE @Exists INT , @RowCount Int = 0 …
David Elliott
  • 81
  • 1
  • 6
6
votes
2 answers

ADODB RecordSet as Access Report RecordSource

I have a simple form, a query and a report in Access 2003. I have to manipulate the results from the query in a recordset using VBA and then pass it on to the report as its RecordSource. If I declare the recordset as RecordSet and use its Name…
Sivakanesh
  • 817
  • 4
  • 13
  • 36
6
votes
2 answers

Return recordset from function in classic ASP

I'm at a loss on how I can return a readable recordset from a function in classic ASP. This is what I came up with, but it's not working: Response.Clear Response.CharSet = "utf-8" Response.ContentType = "text/plain" Dim Count Set Count =…
Albireo
  • 10,977
  • 13
  • 62
  • 96
6
votes
2 answers

ADODB.Parameters error '800a0e7c' Parameter object is improperly defined. Inconsistent or incomplete information was provided

I'm primarily an PHP developer, but I have some old ASP one of our previous developers made that broke and I can't figure out how to fix it. We have a program that sends some variables to a listener page that compares that data to registration…
nosajimiki
  • 241
  • 1
  • 3
  • 7
6
votes
5 answers

"Unspecified error" while opening an ADODB connection

I am facing "Unspecified error" in only one PC of my users. Run-time error '-2147467259 (80004005)': Unspecified error I am running the below VBA code to open a connection to Access database located in network shared drive. But the code throws…
tawfiq
  • 61
  • 1
  • 3
6
votes
3 answers

VBA - Create ADODB.Recordset from the contents of a spreadsheet

I am working on an Excel application that queries a SQL database. The queries can take a long time to run (20-40 min). If I've miss-coded something it can take a long time to error or reach a break point. I can save the results to a sheet fine, it's…
robault
  • 427
  • 1
  • 4
  • 10
6
votes
1 answer

ADODB doesn't exist in Access 2013 project, how do I add a reference to it

I am trying to rebuild an Access adp project in Access 2013 as and mdb. The tables are all linked tables in both version so that is not an issue. I have imported the forms from the old project so the form layouts and code is all there. Where I run…
John S
  • 7,909
  • 21
  • 77
  • 145