ado

IE8 ADO warning when opening a record set with JavaScript

橙三吉。 提交于 2020-01-04 05:31:50
问题 I have a few HTML pages that use javascript to run sql queries etc. these html files are accessed from a share drive on the network. this works perfectly in IE6. My workplace is updating to IE8 and I now get the following warning: "This Web site uses a data provider that may be unsafe. If you trust the Web site, click OK, otherwise click Cancel." This is very annoying as every sql interaction results in this warning. I have spent a lot of time researching and the solution seems to be that I

Error when SQL-querying flatfiles with custom file-extension

大兔子大兔子 提交于 2020-01-03 19:05:57
问题 I'm looking for a way to query flatfiles with custom file-extensions directly via SQL. Normally use something like SELECT * FROM [Text;DATABASE=C:\Flatfiles].[S7121070_ppis#csv] which works terrific with .txt, .csv and .tab. However, in my current project I work with fixed-width flatfiles with an .ftp7-extension. When querying those files in with VBA, I encounter Err# -2147217911, stating that the object or database is locked. Oddly, this occurs only whenever I querying anything that's not a

Copying text from .txt file in Excel using ADO ignores first row

风流意气都作罢 提交于 2020-01-03 05:28:13
问题 I have used some code to import a text file into Excel using ADO as shown below: Sub ImportTextFile() 'Imports text file into Excel workbook using ADO. 'If the number of records exceeds 65536 then it splits it over more than one sheet. Dim strFilePath As String, strFilename As String, strFullPath As String Dim lngCounter As Long Dim oConn As Object, oRS As Object, oFSObj As Object 'Get a text file name strFullPath = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please select text

Using ADO to query text files - terrible performance

こ雲淡風輕ζ 提交于 2020-01-03 02:54:14
问题 I'm writing some code in VBA behind Excel to pull some summary numbers out of potentially huge text files (10M+ rows) out on a network drive. In the past, these numbers have been pulled using greps in linux, but I was hoping to implement something that could be done with a click of a button in Excel for ease of use. My solution works, but it's like 25 times slower than a linux grep - takes 4 minutes to query 10M records, while the grep can do it in 10 seconds. Should I not be using ADO for

Utilize ADO.NET within Classic ASP script

左心房为你撑大大i 提交于 2020-01-02 09:57:56
问题 I'm writing some simple queries which return a single value and I'd like to get the ADO.NET ExecuteScalar method's behavior from Classic ASP's ADO libary. However, I'd prefer to not re-invent the wheel. Is it possible to instantiate ADO.NET's Command object within classic ASP? If so, how would I go about doing that? If I do need to re-implement this feature, what is the best way to do that? Here's what I'm trying to do (In VBScript): set cmd = Server.CreateObject("ADODB.Command") cmd

Utilize ADO.NET within Classic ASP script

↘锁芯ラ 提交于 2020-01-02 09:57:10
问题 I'm writing some simple queries which return a single value and I'd like to get the ADO.NET ExecuteScalar method's behavior from Classic ASP's ADO libary. However, I'd prefer to not re-invent the wheel. Is it possible to instantiate ADO.NET's Command object within classic ASP? If so, how would I go about doing that? If I do need to re-implement this feature, what is the best way to do that? Here's what I'm trying to do (In VBScript): set cmd = Server.CreateObject("ADODB.Command") cmd

ADO - how to select column from xls file where two or more columns have the same name?

故事扮演 提交于 2020-01-02 06:23:11
问题 I have an excel file like this: | | A | B | C | D | | 1 | Name 1 | Name 2 | Name 3 | Name 2 | | 2 | Data | Data | Data | Data | | 3 | Data | Data | Data | Data | As you can see, headers of two columns have the same name - Name 2 . My question is, is it possible to tell the ADO engine from which column to select data? Currently my select looks like this: SELECT [Name 1], [Name 2] FROM [REPORT7_RAW$] WHERE [Name 1] IS NOT NULL and ADO picks up the data from column which is listed under column B

Delphi 6, ADO, MS database “Date” field is same as ftWideString

梦想的初衷 提交于 2020-01-02 05:19:45
问题 I want to copy elements to a remote MS-SQL database. I got conversion error on it. When I checked the ADOTable structure I saw the MS field WHENCREATED DATE [NULL] is converted to ftWideString 10 Hmmmmm.... Is it normal? Or I can set something to Date fields are come as TDateTime? The Provider is "SQLOLEDB.1" 回答1: Its a DATE (yyyy-mm-dd) type which was introduced in SQL Server 2008 as an alternative to the DATETIME type. Because SQLOLEDB.1 precedes this there is a backward conversion to

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

对着背影说爱祢 提交于 2020-01-02 03:43:07
问题 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: http://support.microsoft.com/kb/189897 "Your data may be truncated to 255 characters if the first 8 records for the field(s) being truncated contain 255 or fewer characters. The Microsoft Excel ODBC driver will, by default, scan the first 8 rows of your data

Is it possible to create a deadlock with read-only access?

£可爱£侵袭症+ 提交于 2020-01-02 02:11:06
问题 I have a VB6 application accessing a single table on a MSSQL2000 server via ADO. I'm using read-only access (adOpenStatic, adLockReadOnly) There are other applications in the network which do make changes to the table. For some reason I'm getting errors about my application being chosen as a deadlock victim. I'm really confused: Why can there be a deadlock when I'm just reading from a single table? I'd expect timeouts, because of the writing of the other applications, but not a deadlock...