oledb

OLEDE Error: Login failed for user 'DOMAIN\ComputerName$'.;28000

风流意气都作罢 提交于 2020-02-03 08:21:51
问题 I am trying to deploy an Analysis Services cube in SQL Server 2012. My user account is REALM\Merin where REALM is the domain and my computer's name is Hercules . I am already in Analysis Service's administrator group. When I process the cube using SQL Server Data Tools, I get following error. OLE DB error: OLE DB or ODBC error. Login failed for user 'REALM\Hercules$'.; 28000. My user account is REALM\Merin but I don't know why it is complaining about user REALM\Hercules$. What does this

Using OLEDB / Microsoft Jet driver causes “Number stored as text” in excel file

半腔热情 提交于 2020-02-02 05:27:45
问题 I'm having a problem using OLDEDB from C# to write entries into an excel file. Essentially I want to use an excel template file for formatting some information. The idea is that users can run a query, it'll populate the results into an excel file, where the user can then continue to use excel to maniulate the results. To do this, I create a "raw_data" tab and use OLEDB to write to it like a table. However I'm running into a problem where the preset calculations. Some columns are text, others

Import EXCEL data to SQL Server without data conversion

℡╲_俬逩灬. 提交于 2020-01-24 01:31:06
问题 I am trying to insert excel data into sql server tables. Each column should be imported with the exact same format that the user wrote in the source Excel. I am using following query to fetch data SELECT * FROM OPENROWSET( 'Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;HDR=YES;IMEX=1;Database=H:\Loadloandata\Test\K3.xlsx', 'SELECT * FROM [Sheet1$]') But now in the date column of excel we are receiving some float values( format issues from the users) as shown below Because of the invalid data,

How to use named parameters in a TableAdapter query?

大城市里の小女人 提交于 2020-01-23 17:40:08
问题 I am configuring a dataset through the query wizard. I want to generate the parametrized query. My query looks like this: SELECT Field1, Field2, Field3 FROM SomeTable WHERE Field1 = @field1 The data is being fetched from an Access 2007 database, where this query executes successfully. From code however, I am getting the error: Error in WHERE clause near '@'. Unable to parse query text. How can I solve this? 回答1: Access doesn't support named parameters and uses ? instead of @ (like SQL-Server)

ExecuteScalar always returns 0

无人久伴 提交于 2020-01-17 17:45:30
问题 I'm not sure why this is happening. I've seen the same issue online with little help out there to correct it. When i run my query inside Access i get different values ranging from 0 - 10 but for some reason, it won't return that same value inside my code. static int OrdersPerHour(string User) { int? OrdersPerHour = 0; OleDbConnection conn = new OleDbConnection(strAccessConn); DateTime curTime = DateTime.Now; try { string query = "SELECT COUNT(ControlNumber) FROM Log WHERE DateChanged > #" +

ExecuteScalar always returns 0

你。 提交于 2020-01-17 17:45:02
问题 I'm not sure why this is happening. I've seen the same issue online with little help out there to correct it. When i run my query inside Access i get different values ranging from 0 - 10 but for some reason, it won't return that same value inside my code. static int OrdersPerHour(string User) { int? OrdersPerHour = 0; OleDbConnection conn = new OleDbConnection(strAccessConn); DateTime curTime = DateTime.Now; try { string query = "SELECT COUNT(ControlNumber) FROM Log WHERE DateChanged > #" +

Obtaining the Maximum Field Size of an Access Column

ぃ、小莉子 提交于 2020-01-17 04:11:33
问题 Hi all you Stack Overflowers. I am having bit of a dilemma here. I need to obtain the Maximum of characters you may enter into a field but I have had no success and Google did not produce anyhing similar to what I need Here is my Code lvwDestination.Columns.Add("Fields in Database", 150, HorizontalAlignment.Left); lvwDestination.Columns.Add("DataType", 100, HorizontalAlignment.Left); lvwDestination.Columns.Add("Max", 100, HorizontalAlignment.Left); for (int i = 0; i < DataTable.Columns.Count;

Obtaining the Maximum Field Size of an Access Column

喜你入骨 提交于 2020-01-17 04:11:01
问题 Hi all you Stack Overflowers. I am having bit of a dilemma here. I need to obtain the Maximum of characters you may enter into a field but I have had no success and Google did not produce anyhing similar to what I need Here is my Code lvwDestination.Columns.Add("Fields in Database", 150, HorizontalAlignment.Left); lvwDestination.Columns.Add("DataType", 100, HorizontalAlignment.Left); lvwDestination.Columns.Add("Max", 100, HorizontalAlignment.Left); for (int i = 0; i < DataTable.Columns.Count;

reading excel file -> getting checkbox value

你离开我真会死。 提交于 2020-01-16 19:40:29
问题 So i think ive tried everything now. Im trying to get the values from radiobuttons and checkboxes from an excel sheet. My first approach was to use the Excel Data Reader: http://exceldatareader.codeplex.com/. The cells with checkboxes render empty. Same thing if i use OLEDB; string filename = @"C:\\" + "uploads\\SmartAuditSheet.xls"; string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; OleDbDataAdapter dataAdapter

Auto increment primary key value is always 0

拜拜、爱过 提交于 2020-01-16 17:32:12
问题 I was trying to add a new row to the database using the below code. Even though the Rundef table has a primary key that should auto increment, it's value is always zero. Why does this happen? Private oRunDefDS As DataSet Dim oDR As DataRow = oRunDefDS.Tables("RunDef").NewRow() The design of the Rundef table: 回答1: When you create a new row in code it hasn't been inserted into the database yet. This means the database engine hasn't assigned it's incremental ID and gives it a default of 0