Using C# and the JET OleDB driver (Microsoft.Jet.OLEDB.4.0) to connect to an old Access database (think Access 97). The following SQL statements work fine: But terminating the statement with a semi-colon (;) causes problems: Can SQL statements with DEFAULT be terminated? Answer Default values can (and probabl…
Tag: oledb
Data type for SQL aggregate functions (COUNT, SUM, AVG)
New to SQL. Say I run this query: This will return a single row with a field called “TotalSuppliers”. In my database, the result was “778”. When tested in C# using typeof, the type for this field was short (the ODBC SMALLINT or OleDB SmallInt data type). This matched the data type of t…
Sql string with OLEDB gives error 1004 in VBA
I would like to import a text file into excel filtering just what I want through a VBA macro. When I use LIKE operator in the sql string I get the error 1004. I have tried both * and % as wildcard and ALike instead of Like but there is no difference. test_7.txt and the macro is: Answer SQL statements
Need to retrieve additional values based on Name key in table from DB within VB.NET
So initially I retrieved all values with the name identifier within a table I have, and placed them into a combo box. The data that was loaded into the table is: I used the Query builder within the table adapter configuration wizard to create a string inquiry And in VB implemented it with the selected value o…
How do you return the max of a column (Text field)? [closed]
I can not find a way to execute the following simple query: SELECT max(@SomeCol) FROM test_table; I can do just about everything else except for that, max doesn’t return what I expect.
OLEDB reading CSV file returns first column only
I’m trying to read a pipe separated text file. First lines are “BewerberID”|”Druck”|”Druckdatum”|”HistorieID”|”Bearbeiter”|”BewZuBewGruppeID”|”Bemerkung” “12586”|”EinladungOFD.dot …