adodb

insert data from one excel file to another one using ADODB

拈花ヽ惹草 提交于 2019-12-25 08:49:39
问题 I'm trying to insert data from one excel file to another one using adodb and faced a problem with insert method. It gives me an error message like below: Syntax error in INSERT INTO statement I tried different date formats, with and without quotes, also I tried different method with record sets and still got the same problem with this sql statement. Can someone help me to find out what's the problem? Public Sub InsertIntoTable() Set objConnection = CreateObject("ADODB.Connection")

Excel VBA to query MS Access database on Sharepoint with ADODB - “Not a valid file name”

余生颓废 提交于 2019-12-25 08:24:01
问题 any chance someone could enlighten me on why I'm getting an "Not a valid file name" error when trying to connect to MS Access database stored on Sharepoint? I have no issues with connecting to file on C:\ Set cnn = New ADODB.Connection MyConn = "C:\somelocation\database.accdb" With cnn .Provider = "Microsoft.ACE.OLEDB.12.0" .Open MyConn End With but when I change MyConn to Sharepoint address it doesn't work :/ MyConn = "https://some.website.com/somelocation/database.accdb" I'm getting a "Not

how do i find a hash for a chunk of file without having to save the chunk in a separate file?

倾然丶 夕夏残阳落幕 提交于 2019-12-25 07:26:57
问题 I want to find a hash for a chunk of file and save that hash in another file. I want to do it directly without having to save the chunk in a separate file.. here is my program. Const chunksize = 1024000000 dim istream,ostream Sub WriteChunk(data) Set oStream = CreateObject("ADODB.Stream") oStream.Open oStream.Type = 1 oStream.Write data Dim WshShell, oExec, input,objfile2,str1 Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.exec("C:\Users\Administrator\desktop\experimenting

Declaring XML output parameters with ADODB in ASP Classic

﹥>﹥吖頭↗ 提交于 2019-12-25 04:51:57
问题 I'm working with an ASP Classic legacy code base attempting to call an existing SQL Server stored procedure that declares output parameters with an XML data type. However, every time I try to execute the stored proc I get this error: 0x80040e14 - Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type xml to varchar is not allowed. Use the CONVERT function to run this query. I've experimented with a list of ADODB types,

Excel VBA to SQL Server 2016 Connection String Error

夙愿已清 提交于 2019-12-25 04:02:19
问题 We´re trying to get VBA access to our native server database with the plugin ADODB in Excel. However, we´re running into the same error message no matter what connection string configuration we´re trying. Any help would be appreciated! See below image and code. Sub test() Set Conn = New ADODB.Connection ConnString = "Provider=SQLOLEDB;Data Source=databaseb006;Database=EIU" Conn.Open End Sub 回答1: Consider first checking if SQLOLEDB is among installed OLEDB providers with below PowerShell

ADODB SQL Server connection not working only in IE9

本秂侑毒 提交于 2019-12-25 02:59:26
问题 Got a bit of an odd problem. This code works fine in every other browser, just not in IE9. Standard ADODB connection string being used: Provider=sqloledb;Server=localhost\sqlexpress;Database=DB;uid=DBuser;password=DBPassword;MultipleActiveRecordSets=true; Executed thus: Dim dbGlobal Set dbGlobal = Server.CreateObject("ADODB.Connection") dbGlobal.Open sConnectionString In every browser this works and the application then goes on to load, in IE9 I get the following error message back:

VBA/ADODB Run-Time Error: 3704

你说的曾经没有我的故事 提交于 2019-12-25 02:52:21
问题 The following VBA subroutine will run most queries just fine. (ie: SELECT * FROM DUAL ) Sub DisplayQuery(QueryString As String) Dim rs As New ADODB.Recordset Dim connStr As String connStr = _ "Provider=MSDAORA.1;" _ & "User ID=abc;Password=123;" _ & "Data Source=xxx/xxx;" out QueryString rs.Open QueryString, connStr, adOpenStatic, adLockOptimistic Range("DataTable").Clear Cells(1, 1).CopyFromRecordset rs End Sub However, when I run the query below, the following error message immediately pops

Fill ListView control with ADODB.Connection Query Results?

巧了我就是萌 提交于 2019-12-25 02:43:37
问题 This is my first time trying to connect to a AS400 system, and somewhere along the lines I am failing. Below is my current code I have put together based off a few sample applications. Currently my code is failing at recordList.Open() with message: Execption Source: Microsoft OLE DB Provider for ODBC Drivers Message: ODBC driver does not suppor tthe requested properties. Data: System.Collections.ListDIctionaryInternal I'm attempting to query the AS400, and use my results to fill a Windows

sending an error message from SQL to the browser

五迷三道 提交于 2019-12-24 22:07:42
问题 I have a stored procedure for checking business rules in a holiday booking system but I need it to return error messages if it fails so far I have been using if statements and the else(my error is in the else) looks as follows: BEGIN SELECT 'Error1' END im using ASP adodb connection (apprentice in training) and this is how im trying to retrieve it: if not objDBRS.EOF then Session("Error") = objDBRS(0) if Session("Error") = "Error1" Then Response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert("

EXCEL ADODB Query on local worksheet not Including newly inserted records

断了今生、忘了曾经 提交于 2019-12-24 12:34:49
问题 I am using ADODB to query data form a worksheet in the Active workbook. The data resides on it's own sheet, and has column headers. I've defined the table as an excel ListObject - excel's automatic table formatting construct. I open the connection like this: Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ThisWorkbook.Path & "\" & _ ThisWorkbook.Name & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1