adodb

Strange ADO behavior generating unwanted NO_BROWSETABLE / set fmtonly queries in VB6

最后都变了- 提交于 2020-01-17 04:15:29
问题 I am strugling with some unwanted metadata requests automatically generated by ADO. The behavior started after replacing the default MSDASQL provider with SQLOLEDB. I have also tried the SQLOLEDB and the behavior seems to be the same. Reproducing the problem from the IDE has proved to be difficult, because it seems to be happening kinda random. Whats even more confising is that these queries seems to request metadata for previously opened (and then closed) recordsets. 回答1: I have invastigated

AXMLS database schema - default values and foreign keys

你离开我真会死。 提交于 2020-01-17 04:13:36
问题 I am developing a package for Concrete5 that uses AXMLS format to specify the database schema. http://www.concrete5.org/documentation/how-tos/developers/creating-and-working-with-db-xml-files/ Here is the schema: <?xml version="1.0"?> <schema version="0.3"> <table name="notificationCategory"> <field name="id" type="I"> <!-- integer --> <key/> <autoincrement/> </field> <field name="name" type="C" size="255"> <!-- varchar(255) --> </field> <field name="created" type="T"> <deftimestamp/> </field

Excel VBA - [Microsoft][ODBC Text Driver] Record is too Large

余生颓废 提交于 2020-01-14 06:31:53
问题 I am joining 2 csv files using a Transform (Pivoting) query with Microsoft Access Text Driver (ADODB) in Excel 2016 using VBA. Both csv files are small i.e. 1 is not more than 10 rows and the other may be not more than 20 rows. The Transform query works fine with most csv files. I am only picking up 1 or 2 columns from both the joining files - even though the columns are just 10-15 columns. However, recently with one of the joining files having 60 rows, i started getting an error: [Microsoft]

How to create a new sheet/table in an .xlsx file using ADO in excel vba

谁说我不能喝 提交于 2020-01-14 03:04:32
问题 Hi I'm trying to create a function that will store a range of data selected by a user along with a user's custom name and then using ADO the data will be stored in a new Excel sheet with the user's custom name as the sheet name. So far I've gotten an ADO connection working and can read and write data to the .xlsx file but when I try and create a new sheet by creating a new table I get an error that my sheet name is not correct. I've used test and testName and after digging around I am stumped

Query sheet names with spaces using ADODB in VBA

本小妞迷上赌 提交于 2020-01-06 04:28:12
问题 I'm trying to use adodb to query excel files. But some files have nonstandard sheet/column name. strQry = "select * from [ sheet1$A1:A50]" I got an error saying "Invalid bracketing of name". How do I run query on sheet that has an extra space in its name? These are raw files from clients so I don't want to change the name or anything. Also, I have another problem regarding the column. strQry2 = "select [column\rA] from [sheet1$E1:E122]" "\r" is a line break. I got an error "No value given for

The microsoft access database engine cannot find the input table or query 'dbo'.. (VBA, Access2010)

老子叫甜甜 提交于 2020-01-05 08:46:33
问题 Helllo! I'm an MS Access-beginner. After an upgrade from Access2003 to Access2010 I am changing the database connection of our MS Access-Application from ODBCDirect (not supported anymore) to ADODB. After (hopefully) successfully establishing a DB connection over an ADODB.Connection object I am initializing an ADODB.Command object: Dim qdfWork As ADODB.Command ... Set qdfWork = New ADODB.Command Set qdfWork.ActiveConnection = CurrentProject.Connection qdfWork.CommandText = "[dbo].

Edit records in ADODB recordset

我只是一个虾纸丫 提交于 2020-01-05 07:51:13
问题 What I am trying to do is to get some data from an online server through an SQL Query and then loop through the recordset modifying the records. I get an error when trying to modify the recordset: "Multiple-Step operation generated errors. Check each status value." My question is: Is there a way of modifying a record from a recordset that I got from a Query? In this case I am modifying field 2 if field 1 meets a certain criteria. (In this case Field 2 is a string) Here is the simplified code:

Excel VBA ADO Cutting Decimals (Possible Bug in ADO?)

隐身守侯 提交于 2020-01-05 05:34:07
问题 Can anybody help me with this please? The problem : I have the below code in a module which works perfectly usually, but when i run it on this sample file, I noticed that the decimals in the "Upper Limit" (column D) are cut. A temporary solution i found was that i had to modify in the sample file the upper limit from 1 to 1.0 (so to add ".0" at the end) at line 26 to make it look like a decimal number. After this the decimals were imported correctly on the sheet. But, this is not a solution.

ADODB mySQLi Connection

若如初见. 提交于 2020-01-04 02:04:27
问题 I am using mysql with adodb and what changes i have to do if i want to shift to mysqli. this is my connection file and i need to make changes in this file only or i have to update all my query files. include_once("adodblib/adodb.inc.php"); class ADb { function ADb() { global $dbserver; global $dbuser; global $dbpass; global $database; $dbuser = "root"; $dbpass = "asdasdasd"; $dbserver = "localhost"; $database = "DB_NAME"; $this->conn1 = &ADONewConnection('mysql'); $this->conn1->PConnect(

VBA: Import table from Excel into SQL

被刻印的时光 ゝ 提交于 2020-01-02 07:54:49
问题 I am trying to import a data table from excel into SQL Server 2012, using VBA. Preferably with help of a UDF. The excel table looks something like this. TableID 2012 2011 2010 2009 row 1 11 12 13 14 row 2 21 22 23 24 row 3 31 32 33 34 etc.. (I placed the numbers in the cells to designated their position. For example 11 = row 1, column 1) The database table looks something like this. Header: id | year | row1 | row2 | row3 | etc.. ExampData: TableId 2012 11 21 31 .. ExampData: TableId 2011 12