oledb

Get OleDbCommandBuilder 's generated SQL commands

谁说我不能喝 提交于 2019-12-10 15:35:30
问题 I use OleDbDataAdapter and OleDbCommandBuilder to fill DataSet object with database contents, and then update database according to a changes that I made in the DataSet. The problem is that I get the exception: "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records". I've found an explanation of this error: Because a record could have been modified after it was returned from the SELECT statement, but before the UPDATE or DELETE statement is issued, the automatically

Location of query definition in XLSX file

我只是一个虾纸丫 提交于 2019-12-10 14:33:17
问题 After creating an xlsx file with the following custom query (loading data from the jsonplaceholder service from typicode.com) let Source = Json.Document(Web.Contents("https://jsonplaceholder.typicode.com/posts")), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"userId", "id", "title", "body"}, {"userId", "id", "title", "body"}) in #"Expanded Column1" and

Making a connection with MS Access

…衆ロ難τιáo~ 提交于 2019-12-10 14:22:30
问题 Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. and Microsoft.JET.OLEDB.4.0' provider is not registered on the local machine. are both errors for me. I've been trying both while trying to create an Access connection. I'm not sure what to do anymore. I have 32 bit office on a 64 bit machine. I found solutions where they said to install the Access Database Engine but it won't let me install 64 bit with 32 bit office. Another source mentioned to bypass this you can go

Best way to check OleDbConnection state

点点圈 提交于 2019-12-10 12:45:30
问题 Apparently (MSDN) sometimes OleDbConnection.ResetState() does nothing, so even if the connection fails OleDbConnection.State will still be set to Open. I am looking for best workaround for this, so that when I check connection state I can avoid raising exceptions (as long as connection hasn't failed between the last check and usage attempt). Is there nothing better than sending a "useless" sql statement each time just to see if an exception is thrown? How do you make sure your connection is

Insert into OLEDB VB.NET

大憨熊 提交于 2019-12-10 12:24:20
问题 What is wrong with this? da.InsertCommand = New OleDb.OleDbCommand("Insert Into Table1 Values( 1, '" & TextBox1.Text & "')") da.InsertCommand.Connection = con con.Open() da.Update(ds) con.Close() The database is never updated no matter what. Or is there a better way to insert into db? I have tried the CommandBuilder but it doesnt seem to work as well. Or can I directly execute a query on my database in VB.NET? 回答1: You are a bit confused regarding on what DataAdapter.Update does. The Update

how to update row data fetched using ATL OLE database in C++ from simple SQL server table

喜你入骨 提交于 2019-12-10 12:20:04
问题 I am experimenting with OLE database programming using Microsoft ATL and C++ with Visual Studio 2005. I have created a sample Windows console program along with a simple database with a single table containing two columns, a 10 character (ANSI numeric digits) id and a signed 32 bit long count. There are two rows in the table. The database, table, and rows were created with SQL Server 2005 Server Management Studio Express. I need to know the method used with ATL to update the data in a row

connection data source Crystal report

荒凉一梦 提交于 2019-12-10 11:59:58
问题 How we can delete a second connection(ODBC) data source after adding a conntion OLEdb? Thanks. 回答1: You are not adding and deleting connections to Crystal reports. You are adding datasources. If you can see 2 connections there is a table, stored proc, view or command, which is using the second one. Update the connection to the new one for all datasources 来源: https://stackoverflow.com/questions/29366201/connection-data-source-crystal-report

Creating Access 07 DB with VB.net always runs Repair when opening it the first time

柔情痞子 提交于 2019-12-10 11:56:41
问题 I have a VB.NET (Visual Studio 2010) app that creates an Access 07 database programmatically, then imports a CSV file as a new Access table. The DB gets created, and the CSV gets imported with no problems. The code uses ADOX.Catalog to create the database, and an OleDb.OleDbConnection with ACE to import the CSV. All is well, except the first time I open the Access DB. When I launch Access 07 from my desktop (Office 07), I get the green "repair" progress bar at the bottom right of the screen

How to make OleDb code run asynchronous?

♀尐吖头ヾ 提交于 2019-12-10 10:25:19
问题 I've seen a lot of examples for asynchronous when trying to do Web downloading/reading. But I fail to find a sample or anything for OleDb (or is there a better equivalent?), I'd like to use the new and simplified Async and Await features of C# 5.0. This is just an example of how I use OleDb now: public void insertTafelloc(int tafelnr, string datum, string tijd) { tafelsupdate = false; try { db.cmd.Connection = db.connection; db.connection.Open(); db.cmd.CommandText = "SELECT * FROM tafels

Querying Jet Databases/Excel files with C# under x64 OS

最后都变了- 提交于 2019-12-10 10:24:14
问题 So I have learned that that the Microsoft.Jet.OLEDB.4.0 data provider for querying data sources like Microsoft Access MDB files and Excel spreadsheets does not work under a Windows 64-bit operating systems. What I am now supposed to use to query against these file types in .NET 3.5 (C#) applications in order to ensure compatibility in both x86 and x64 environments? I have scoured the Internet and I cannot seem to find a straight answer on how to handle this incompatibility. I've also tried