oledb

Error With Dynamically Created SQL Insert statement

耗尽温柔 提交于 2019-12-08 12:37:20
问题 May I know what's wrong with my statement? I receive a syntax error. Been trying to find out what's wrong all day. :( cmd.CommandText = "INSERT INTO LogIn(Username,Password) VALUES('" + AddUsernameTextBox.Text + "','" + AddPasswordTextBox.Text + "')"; 回答1: cmd.CommandText = "INSERT INTO LogIn([Username],[Password]) VALUES('" + AddUsernameTextBox.Text + "','" + AddPasswordTextBox.Text + "')"; This code will help if the error is due to reserved keywords :- username and password. Please quote

Using AS400 date in SSRS Report

百般思念 提交于 2019-12-08 12:15:56
问题 Running a SELECT against the AS400 using the IBMDA400 OleDb provider appears to return dates as string values, SSRS just laughs at you when you try and apply a date format to the field. I've tried a simple CAST in the SELECT to no avail. How can I get an actual DBTYPE_DBDATE struct back from the iSeries OleDb provider? I should mention that the dates in question are all being returned by a UDF with a type of DATE. IBM appears to map DATE type into a DBTYPE_STR OleDb type. 回答1: The field(s) in

How to match date to row then get the final column value using EPPlus?

痞子三分冷 提交于 2019-12-08 11:40:52
问题 So far I can do an easy data grab from the spreadsheet, just getting the ref number row but I currently don't know how to match the row to the data section before getting the correct data out. I currently have to extract some data from the excel spreadsheet example below: Start date Ref number 29/07/2015 2342326 01/07/2016 5697455 02/08/2016 3453787 02/08/2016 5345355 02/08/2015 8364456 03/08/2016 1479789 04/07/2015 9334578 The main question is would it be possible to read in the data from a

How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider

北战南征 提交于 2019-12-08 11:03:42
问题 How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider on windows 10 and windows 7 ? 回答1: You can use for example tool RegDllView. Search for "OraOLEDB", result could be this: A simpler approach would be this navigate to your ORACE_HOME\bin directory and locate file OraOLEDB??.dll . Check version with right-hand mouse click -> Properties -> Details. However, you just get the version of the file, it does not necessarily mean that this DLL is also registered and ready

Dependent Excel cells are not updated automatically

ⅰ亾dé卋堺 提交于 2019-12-08 09:23:57
问题 I wrote this method (almost similar in other post) public void update(string fileName, string sheetName) { string connString = connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath(fileName) + ";Extended Properties='Excel 12.0;HDR=NO'"; try { OleDbConnection oledbConn = new OleDbConnection(connString); oledbConn.Open(); OleDbCommand cmd = new OleDbCommand("UPDATE ["+sheetName+"$B5:B5] SET F1=17", oledbConn); cmd.ExecuteNonQuery(); oledbConn.Close(); } catch(Exception

How can I specify the character encoding to be used by OLEDB when querying a DBF?

吃可爱长大的小学妹 提交于 2019-12-08 09:19:39
问题 Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file? A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.NET could do this for me. UPDATE The suggestion by Viktor Jevdokimov does not seem to work automatically. But it made me investigate manual conversion of the

PowerBuilder 10.5 Application on Windows XP 32-bit to Windows 7 64-bit

对着背影说爱祢 提交于 2019-12-08 07:24:45
问题 I currently have a 32-bit PowerBuilder application that we are trying to port over to a Windows 7 64-bit environment. Realizing the obvious that PowerBuilder 10.5 was built previously before Window7 came out and the big also the obvious fact that this application was built within a Windows XP 32-bit environment. The 32-bit PowerBuilder application spits out the following error message when deployed on a Windows 7 64-bit machine. Application Terminated. Error: Invalid DataWindow row/column

How do I update excel file with oleDbDataAdapter.Update(myDataSet)

孤者浪人 提交于 2019-12-08 06:40:57
问题 I keep getting an InvalidOperationException ("Update requires a valid UpdateCommand when passed DataRow collection with modified rows"). I just cant work out what's wrong with the update command. Here's the code I have so far: OleDbConnection connection; OleDbDataAdapter clientsAdapter new OleDbDataAdapter(); DataSet myDataSet = new DataSet(); public void Setup() { connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Clients.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES"";";

Error tells me I haven't close the connection, but haven't I?

此生再无相见时 提交于 2019-12-08 05:00:32
问题 I must have missed something here. I am trying to create a table but I am getting an error telling me that connection is still open. But where??? I have re-read the code but I can't find where the connection is still open... Problem lays here: objOleDbConnection.Open() Error say: You attempted to open a database that is already opened by user 'Admin' on machine 'machine'. Try again when the database is available. private void sfdNewFile_FileOk(object sender, System.ComponentModel

C# and Oracle database connection

半世苍凉 提交于 2019-12-08 04:18:02
问题 Hello i have a project which the developer uses conn1 = new OleDbConnection("Provider=MSDAORA; Data Source=example;User ID=test;Password=test;Unicode=True"); conn1.Open(); I have problem with that provider MSDAORA and i think it's old So i want to Connect to my database with another easy solution without MSDAORA. Thank you 回答1: Try with Oracle provider, add reference to System.Data.OracleClient assembly use OracleConnection as in this example string connectionString = "..."; using