oledb

Provider field in connection string oledb

本秂侑毒 提交于 2019-12-13 04:09:22
问题 Hey guys I'm new to C# and I'm a little confused on the fields that need to be provided in the connection string while using oledb to connect to my sql server 2008 database, particularly one of them. The "Provider" field is really giving me problems, partially because I'm not really sure what it does. I have tried two different Provider strings and they both come back with the same error: The "System.Data.SqlClient provider is not registered on the local machine Or The "Microsoft.Jet.OLEDB.4

OLEDB comparison problem nvarchar against ntext (SQLServer 2005)

妖精的绣舞 提交于 2019-12-13 04:04:22
问题 I have table Tbl1( SomeName nvarchar(64) ) Over OLEDB I'm trying to select SELECT 1 FROM Tbl1 WHERE SomeName = ? binding 3 character unicode as parameter causes: DB_E_ERRORSINCOMMAND(0x80040E14L) "The data types nvarchar and ntext are incompatible in the equal to operator" I have already tried following input bindings: 1) ... currentBind.wType = DBTYPE_VARIANT; currentBind.cbMaxLen = 20 // where data points to valid VT_BSTR allocated by SysAllocString ... 2) ... currentBind.wType = DBTYPE

office component installation on Azure web app

佐手、 提交于 2019-12-13 03:15:28
问题 Our web application using oledb for excel import and export, we have install microsoft.ace.oledb.12.0 provider on the local machine, but we have published the website on azure web app , so how to install microsoft.ace.oledb.12.0 provider on azure web app. please help us. 回答1: how to install microsoft.ace.oledb.12.0 provider on azure web app. TL;DR: You Can Not. Slightly longer: you do not have the access to the underlying machine or operating system necessary to install COM components. You

Adding Parameters to OleDBConnection

蓝咒 提交于 2019-12-13 02:26:36
问题 I'm executing the below to run a query from an Access DB. Dim search As String = txtUnitCode.Text Dim sText As String = String.Empty Dim aClients As String = My.Settings.ClientDB Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & aClients & "" Using cn As New OleDb.OleDbConnection(sConnString) cn.Open() If txtUnitCode.Text = "" Then Exit Sub Dim cmd As New OleDb.OleDbCommand("SELECT Name FROM Units WHERE (Code = " & search & ") ", cn) Dim r As OleDb.OleDbDataReader

Alternative to ACE.OLEDB.12 for querying Excel data tables

微笑、不失礼 提交于 2019-12-13 02:12:26
问题 I am currently using ACE.OLEDB.12 for querying Excel data tables and I encountered a limitation with the provider that is frustrating. The provider can only address the first 256 columns and 65536 rows so if I position any of my data tables outside that window the engine comes back with an error message of range not found . Does anyone know of any other data provider that will allow me to query data directly from data tables like the example below using ACE.OLEDB.12 ? SELECT * FROM [Main

JOIN clause with WHERE

。_饼干妹妹 提交于 2019-12-13 01:28:58
问题 Ive got 3 tables called Course, CourseCatogory, CourseCourseCatagory. CourseCourseCatagory is a junction table. I am trying to select courses that are linked to particular catogory using the junction table. This is my first time using a junction table and JOIN clause, I just don't know how to go about doing it. It would be highly appreciated if there's anything you could do to help me. public static courseDetails getSelectedCatogory(string Category) { courseDetails details = new courseDetails

Connecting to a database on a LAN network location

不问归期 提交于 2019-12-13 01:18:38
问题 I have an application that I want to access a file over a network. I am currently using this connection string. string myconnectionstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\" + PCName + "\\datafolder\\data.mdb"; The Pc name is the name of well the computer as seen on the network I get that using: Dll Netapi32 however while i do get the path exactly as it should be my code adds "C:" to the path instead of "\PCNAME\datafolder\data.mdb" I have read a lot on this and none of it

How to use IMalloc::Free?

随声附和 提交于 2019-12-13 00:05:10
问题 I'm using ICommandText::GetCommandText method. According to the MSDN documentation (http://msdn.microsoft.com/en-us/library/ms709825(v=VS.85).aspx) I need to use IMalloc::Free to release the memory allocated for LPOLESTR *ppwszCommand output parameter. How do I use this interface to do that? 回答1: Just pass it to CoTaskMemFree, it's wrapping the same default OLE allocator CoGetMalloc is exposing. CoTaskMemAlloc/Free are convenient shortcuts to IMalloc interface of the default OLE allocator so

OleDbCommand Stored Procedure Cannot Find Access Query

坚强是说给别人听的谎言 提交于 2019-12-13 00:03:15
问题 I am attempting to run an Access append query in C# using OleDbCommand. As a test I created two queries in the database (one a copy of the other) AppendMe Append Me AppendMe works fine but when I attempt to execute the second Append Me I get an OleDbException "cannot find the input table or query 'Append'" In other words its only seeing the first word of the string. I've tried manipulating the string (using verbatim string etc) Nothing works. I am using c# Express 2010 and Access 2003 Here's

Microsoft Access required for C# database access on end-user machines?

江枫思渺然 提交于 2019-12-12 21:19:36
问题 Silly question, perhaps. I've developed an app on my machine that uses a Microsoft Access database (.mdb) to access certain information and populate a table with monitoring data using OLEDb. The application works fine on my machine, but when I put the release on test machines (without MS Access), it crashes. Interestingly, if I were to launch the application on the testing machine with the database filename just renamed, it loads like it should albeit without the data. I seem to get an