oledb

How to solve a syntax error when using this INSERT INTO statement and the .NET OleDb namespace?

…衆ロ難τιáo~ 提交于 2019-12-24 06:01:36
问题 I keep getting an error when I attempt to insert values into a Access database. The error is syntactic, which leads to the following exception: OleDbException was unhandled Syntax error in INSERT INTO statement. private OleDbConnection myCon; public Form1() { InitializeComponent(); myCon = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\File.mdb"); } private void insertuser_Click(object sender, EventArgs e) { OleDbCommand cmd = new OleDbCommand(); myCon.Open(); cmd

What is the best way to fetch a single record via an OleDbConnection?

安稳与你 提交于 2019-12-24 05:48:40
问题 C#, .Net 2.0: I have a class that wraps a single record from a database accessed via an OleDbConnection object. It is quite simple, it executes a "SELECT * FROM table WHERE key = {some value};" and then exposes the fields as properties with a few methods to manipulate the data. When I create a new instance of this object, the code that gets executed looks like: DataSet ds = new DataSet(); ds.Locale = CultureInfo.InvariantCulture; OleDbDataAdapter da = new OleDbDataAdapter(cmd); if (cmd

Error while extracting data from Sybase using OLE DB in SSIS

怎甘沉沦 提交于 2019-12-24 04:44:08
问题 I am having problems extracting data from Sybase using Advantage 11 OLE DB Provider in SSIS (2017). I can connect to the database, see the list of tables, and, when selecting a table as a data source I can see the columns. However, when I click Preview (or run the data flow task), I get this error: The provider cannot derive parameter information from the command. Use SetParameterInfo. (Advantage OLE DB Provider) I am using no parameters, my Data Access mode is set to Table or View (see

Connect to OLEDB data source from Java?

馋奶兔 提交于 2019-12-24 03:29:56
问题 We are trying to connect to a SQL Server instance used by the ACT CRM system. They have managed to lock things down so it isn't possible to connect to the SQL back-end using ODBC (there is some special utility that will add ODBC support that you can install if you purchase the primo version of the software, but that's just crazy). The recommended method of connecting to theses databases is using an OLEDB connection. Does anyone have any tricks/ideas/etc... for how to make and use an OLEDB

Add apostrophe character to Excel export with OleDB connection

爷,独闯天下 提交于 2019-12-24 03:01:35
问题 I want to generate Excel report identical that we use before (with old version of Excel). The only problem is that all cells in old style reports were presented as strings with apostrophe character: I created basically the same report with the next code: oleDbConnection = new System.Data.OleDb.OleDbConnection( "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileFullPath + ";Extended Properties='Excel 12.0 Xml;HDR=YES' "); oleDbConnection.Open(); oleDbCommand.Connection = oleDbConnection;

Add apostrophe character to Excel export with OleDB connection

不问归期 提交于 2019-12-24 03:01:05
问题 I want to generate Excel report identical that we use before (with old version of Excel). The only problem is that all cells in old style reports were presented as strings with apostrophe character: I created basically the same report with the next code: oleDbConnection = new System.Data.OleDb.OleDbConnection( "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileFullPath + ";Extended Properties='Excel 12.0 Xml;HDR=YES' "); oleDbConnection.Open(); oleDbCommand.Connection = oleDbConnection;

SQL Parameter for ALL

假如想象 提交于 2019-12-24 02:13:09
问题 I was wondering if there was a parameter in SQL for all (not *!) For example, I'm writing a search table now, and if the user does not input something in the text box, it would mean to ignore that specific parameter and display ALL of them for that field. I understand you could make separate OLEDB or SQL commands for each scenario and it would work, but I would just like to do it in one command where if the textbox is empty, I would just ignore it. So far, what this guy said I tried but didn

After reinstall SYBASE oledb provider it does not appear in SSIS connection manager

走远了吗. 提交于 2019-12-24 01:17:17
问题 I have reinstalled Sybase Adaptive Server Enterprise PC Client 12.5.4. After that it's completely disappeared from SSIS connection manager. How can I fix it? 回答1: Use ADO.Net not OLEDB When you need to connect to Sybase you have to add an ADO.Net connection not OLEDB: Official documentations In the following official documentation they mentioned that: Adaptive Server ADO.NET Data Provider can be integrated into SQL Server Integration Services (SSIS), allowing for native access to ADO.NET Data

F# OleDb Syntax Error in INSERT INTO Statement Pulling Data from Access to Linked SQL Server

一个人想着一个人 提交于 2019-12-24 01:02:01
问题 I'm running an F# application to pull data from an Access table to a linked SQL Server table. Here is the resulting query: INSERT INTO dbo_TempTerm (UnitID, PolicyTermYear, InsuredName, PolicyNumber, RenewalDate, CovATotal, CovBTotal, CovLTotal, DwellExtn, AllOtherPerilDeductible, MedPay, TotalPremium, HurricaneDeductible, Zone, Subzone, PercentCRC, PercentCRD, YearBuilt, RenYrs, PercentCFD, PercentHA, PercentMLD, GRP1, PercentNH, QCLM, RateV, CRI, AgentCode, AgentName, AFOCode, PolicyType,

The operation could not be performed because OLE DB provider “SQLNCLI10” for linked server “(null)” was unable to begin a distributed transaction

痞子三分冷 提交于 2019-12-24 01:01:52
问题 I am using Connection Pooling to connect with SQL Server 2008. With JNDI Name using XA connection to get access across DB server. Now my all query execute properly except query which use OPENROWSET. Now this OPENROWSET runes fine with normal connection but while executing with XA connection it gives an exception : The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "(null)" was unable to begin a distributed transaction. Can any one help me for this issue