odbc

Is it possible to use (fluent)nhibernate with an odbc connection?

♀尐吖头ヾ 提交于 2019-12-05 12:30:10
i have to use a custom odbc driver. All i need to pass as a connection string is the DSN. How do i do this with (fluent)nhibernate? FluentNHibernate.Cfg.Db does only offer a OdbcConnectionStringBuilder class with an DSN method. How do i use this? You can create your own OdbcConfiguration class that derives from PersistenceConfiguration . Depending on your database, you will have to replace the Dialect in the following class. public class OdbcConfiguration : PersistenceConfiguration<OdbcConfiguration, FluentNHibernate.Cfg.Db.OdbcConnectionStringBuilder> { protected OdbcConfiguration() { Driver

What is a privileged instruction?

↘锁芯ラ 提交于 2019-12-05 11:49:28
问题 I have added some code which compiles cleanly and have just received this Windows error: --------------------------- (MonTel Administrator) 2.12.7: MtAdmin.exe - Application Error --------------------------- The exception Privileged instruction. (0xc0000096) occurred in the application at location 0x00486752. I am about to go on a bug hunt, and I am expecting it to be something silly that I have done which just happens to produce this message. The code compiles cleanly with no errors or

Still get error popup even when ApplyUpdates is inside try…except

删除回忆录丶 提交于 2019-12-05 11:42:19
Solution found, see my comment below D5, odbc to mysql database This code: with QryCmdPerf do begin Close; ParamByName('ACCTID').AsInteger:= AcctId; ParamByName('FROMDT').AsString:= MySQLDate(FromDt); ParamByName('TODT').AsString:= MySQLDate(ToDt); Open; first; try edit; FieldByName('PnL').AsFloat:= 97979; ApplyUpdates; except close; end; end; // with (specifically the "ApplyUpdates") causes a popup to appear with the text "Update Failed" if the PnL field already has the value 97979, evidently because of this code: procedure TUpdateSQL.ExecSQL(UpdateKind: TUpdateKind); begin with Query

Powershell to read from database using ODBC DSN instead of connection string

帅比萌擦擦* 提交于 2019-12-05 11:04:26
I know how to read value from database using connectionstring, i.e. Establish database connection to read $conn = New-Object System.Data.SqlClient.SqlConnection $conn.ConnectionString = "Server=10.10.10.10;Initial Catalog=database_name;User Id=$username;Password=$password;" $SQL = "..." $conn.Open() # Create and execute the SQL Query $cmd = New-Object System.Data.SqlClient.SqlCommand($sql,$conn) $count=0 do{ try{ $rdr = $cmd.ExecuteReader() while ($rdr.read()){ $sql_output += ,@($rdr.GetValue(0), $rdr.GetValue(1)) $count=$count + 1 } $transactionComplete = $true } catch{ $transactionComplete =

ODBC driver use in Qt

半腔热情 提交于 2019-12-05 10:43:18
I wanted to use read and write mdb file (Ms Access file) and I am completely new in using ODBC in Qt. So can anyone help me to know whether should i need to download the drivers and if yes then from where can i download ? and if you know about connectivity then any help would be appriciated. If you need to access an MS Access database with Qt, you don't need (if I'm not mistaken) to install anything regarding drivers (everything should be already there). You can connect to a database with a connection string. Something like this : QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db

How to install DB2 ODBC or OLEDB Driver

爱⌒轻易说出口 提交于 2019-12-05 10:30:18
I have already installed IBM DB2 Database Express on Windows 7 Pro. Now, I would like to create my C# code in order to select/insert/update records in DB2 tables. I spend the whole day searching over the internet for links on how to install either OLEDB or ODBC Driver in order to connect to DB2 database. But without success!!! So, i'm wondering if somebody can help me or send me a useful link to download driver. Thank you Download: In the webpage: http://www-933.ibm.com/support/fixcentral/legacy/ With parameters "Information Management" - "IBM Data Server Client Packages" - Custom version and

Unable to append to SQL Server table using sqlSave in R

[亡魂溺海] 提交于 2019-12-05 09:48:36
I am trying to update a SQL table using sqlSave function of RODBC package in R. Data is present in a data frame. When I try to run the command: sqlSave(DBConn, dat=df, verbose=T, tablename='table', append=T) I get the following error: Query: INSERT INTO "table" ( "col1", "col2", "col3", "col4" ) VALUES ( ?,?,?,?,? ) sqlwrite returned 42000 -131 [Sybase][ODBC Driver][Sybase IQ]Syntax error near 'table' on line 1 [RODBC] ERROR: Could not SQLPrepare 'INSERT INTO "table" ( "col1", "col2", "col3", "col4" ) VALUES ( ?,?,?,?,? )' What am I doing wrong here so that I am not getting the values in

How to call stored procedure taking array using odbc:param_query in Erlang

故事扮演 提交于 2019-12-05 09:07:18
I have a stored procedure in db2 create type intArray as integer array[100]@ create or replace procedure sum(in numList intArray, out total integer) begin declare i, n integer; set n = CARDINALITY(numList); set i = 1; set total = 100; while (i <= n) do set total = total + numList[i]; set i = i + 1; end while; end@ I am trying to call through Erlang odbc:param_query. odbc:param_query(Ref, "CALL sum (?, ?)", [{sql_integer,[1]}, {sql_integer,out, [1]}]). The above is giving me proper return as {executed,1,[{101}]} But when I pass multiple values as odbc:param_query(Ref, "CALL sum (?, ?)", [{sql

One of the SELECT fails using unixOdbc - SQLSTATE[24000]: Invalid cursor state

[亡魂溺海] 提交于 2019-12-05 08:11:49
I am running Ubuntu 13.10 with FreeTDS and ODBC (package: php5-odbc) installed. I use tds version = 8.0, but also tried tds version = 7.2. I am using PDO and this is my DSN: $dsn = sprintf('odbc:Driver=FreeTDS;Server=%s;Port=1433;Database=%s', DB_SQL_SERVERNAME, DB_DB_NAME); I connect to MSSQL instance and perform some INSERT/SELECT queries using transactions, however I can not figure out why this query fails: SELECT id FROM tblColumns WHERE siteID = 10063 AND typeID = 1000 AND extendedTypeID = 18 AND label = 'RwThiFc85A' giving error: SQLSTATE[24000]: Invalid cursor state: 0 [FreeTDS][SQL

SQL-Server Backend, MS Access Frontend: Connection

久未见 提交于 2019-12-05 07:57:46
Connecting from MS Access to SQL Server via ODBC (not necessarily). I would like to bind my Access forms to SQL Server data. It would be great being able to dynamically filter recordsets on the server (as with pass through queries) but I would like to avoid the forms being read-only. I am very grateful for any suggestions. Thanks in advance. I have found similar questions here but not the answer that I am looking for. I worked with following articles: Access DB with SQL Server Back End - Stack Overflow Import or link to SQL Server data - Access - Office Microsoft is Aligning with ODBC for