jet

System.Data.OleDb.OleDbException: Invalid internet address. How do you connect to excel files located on a webserver using OleDb

萝らか妹 提交于 2019-12-01 02:17:46
问题 I'm trying to create an OleDb connection to an Excel file that is located on a SharePoint server. The example code I'm playing with at the moment throws an OleDb exception "Invalid internet address": public static void ConnectToRemoteExcelFile() { string connectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=Yes;\";", "http://horde.servername.co.uk/Docs/Documents/Sales.xlsx"); using (OleDbConnection connection = new

Specify mdw file in embedded connection string to another Jet mdb: possible?

送分小仙女□ 提交于 2019-11-30 20:41:44
问题 I can use the following syntax in a Jet (mdb) query to select data from another .mdb file: SELECT * FROM [Database=C:\Tempo\AnotherDB.mdb;].MyTable alternatively SELECT * FROM MyTable IN 'C:\Tempo\Another.mdb' I want to extend this to use workgroup security a.k.a. User Level Security (ULS). I know how to specify a userID and password e.g. SELECT * FROM [Database=C:\Tempo\AnotherDB.mdb;UID=Admin;PWD=***;].MyTable but this only works when both mdb's share the same mdw. How would I specify the

Jet Engine - 255 character truncation

旧城冷巷雨未停 提交于 2019-11-30 09:23:16
I'm needing to import an Excel spreadsheet into my program and have the following code: string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;IMEX=1;HDR=NO;""", MyExcelFile.xls); command.CommandText = "SELECT * FROM [Sheet1$]"; (Note, code above isn't real code but should let you see what I'm doing) I'm getting the file imported, only problem is any columns in the Excel sheet which are over 255 characters are being truncated. Is there any way around this happening? I read somewhere that if you make sure there is a long line

Accessing a JET (.mdb) database in Python

时光怂恿深爱的人放手 提交于 2019-11-30 08:48:34
Is there a way to access a JET database from Python? I'm on Linux. All I found was a .mdb viewer in the repositories, but it's very faulty. Thanks MDB Tools is a set of open source libraries and utilities to facilitate exporting data from MS Access databases (mdb files) without using the Microsoft DLLs. Thus non Windows OSs can read the data. Or, to put it another way, they are reverse engineering the layout of the MDB file. Jackcess is a pure Java library for reading from and writing to MS Access databases. It is part of the OpenHMS project from Health Market Science, Inc. . It is not an

How to get id of newly inserted record using Excel VBA?

这一生的挚爱 提交于 2019-11-30 07:31:48
问题 Seems a common enough problem this, but most solutions refer to concatenating multiple SQL commands, something which I believe can't be done with ADO/VBA (I'll be glad to be shown wrong in this regard however). I currently insert my new record then run a select query using (I hope) enough fields to guarantee that only the newly inserted record can be returned. My databases are rarely accessed by more than one person at a time (negligible risk of another insert happening between queries) and

Microsoft.Jet.OLEDB.4.0 导入excel报\"找不到可安装的ISAM\"

隐身守侯 提交于 2019-11-30 02:59:19
用使用Microsoft.Jet.OLEDB.4.0导入Excel文件时,报“找不到可安装的ISAM"错误原因: string connstring = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + fileName + ";Extended Properties=Excel 8.0;;HDR=YES;IMEX=1"; using (OleDbConnection conn = new OleDbConnection(connstring)) { conn.Open(); DataTable sheetsName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,new Object[] { null, null, null, "TABLE" });//得到所有sheet的名字 string firstSheetName = sheetsName.Rows[0][2].ToString(); //得到第一个sheet的名字 string sql = string.Format("SELECT * FROM [{0}]", firstSheetName); //查询字符串 //string sql = string.Format("SELECT * FROM [{0}]

Operation must use an updatable query. (Error 3073) Microsoft Access

纵饮孤独 提交于 2019-11-29 16:09:27
I have written this query: UPDATE tbl_stock1 SET tbl_stock1.weight1 = ( select (b.weight1 - c.weight_in_gram) as temp from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' and c.status <> 'D' ), tbl_stock1.qty1 = ( select (b.qty1 - c.qty) as temp1 from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' and c.status <> 'D' ) WHERE tbl_stock1.item_submodel_id = 'ISUBM/1' and tbl_stock1

Jet Engine - 255 character truncation

China☆狼群 提交于 2019-11-29 14:11:18
问题 I'm needing to import an Excel spreadsheet into my program and have the following code: string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;IMEX=1;HDR=NO;""", MyExcelFile.xls); command.CommandText = "SELECT * FROM [Sheet1$]"; (Note, code above isn't real code but should let you see what I'm doing) I'm getting the file imported, only problem is any columns in the Excel sheet which are over 255 characters are being truncated

Accessing a JET (.mdb) database in Python

拜拜、爱过 提交于 2019-11-29 12:29:43
问题 Is there a way to access a JET database from Python? I'm on Linux. All I found was a .mdb viewer in the repositories, but it's very faulty. Thanks 回答1: MDB Tools is a set of open source libraries and utilities to facilitate exporting data from MS Access databases (mdb files) without using the Microsoft DLLs. Thus non Windows OSs can read the data. Or, to put it another way, they are reverse engineering the layout of the MDB file. Jackcess is a pure Java library for reading from and writing to

SELECT @@IDENTITY not scoped by DB object?

一曲冷凌霜 提交于 2019-11-29 11:09:35
I have the following code in MS Access: Sub IdentityFail() Dim db1 As DAO.Database, db2 As DAO.Database Dim id1 As Long, id2 As Long CurrentDb.Execute "CREATE TABLE LocalDummy (Col1 AUTOINCREMENT, Col2 INT)", dbFailOnError Set db1 = CurrentDb Set db2 = CurrentDb db1.Execute "INSERT INTO LocalDummy(Col2) VALUES(Null)", dbFailOnError id1 = db1.OpenRecordset("SELECT @@IDENTITY")(0) db2.Execute "INSERT INTO LocalDummy(Col2) VALUES(Null)", dbFailOnError id2 = db2.OpenRecordset("SELECT @@IDENTITY")(0) Debug.Print id1, id2 Debug.Print db1.OpenRecordset("SELECT @@IDENTITY")(0), _ db2.OpenRecordset(