odbc

How to query table structures from an access database?

*爱你&永不变心* 提交于 2019-12-24 00:04:08
问题 I want to get the structure of all the tables and odbc-Datasources in an Access database with C#. So I tried this code: string text=""; var tables = GetApp().CurrentData.AllTables; for (int i = 0; i < tables.Count; i++) { var currentTable = tables.Item(i); text = text + currentTable.FullName + Environment.NewLine; } MessageBox.Show(text); This returns all the availible tablenames. But how do I get the columnnamens and types of the tables? I tried this: var props = currentTable.Properties; for

MSAccess and ODBC. Filter dialog doesn't show

女生的网名这么多〃 提交于 2019-12-23 23:20:03
问题 I have problem with Microsoft Access Database connected via ODBC to Postgresql database. Filter dialog - for filtering data using multiple selectable checkboxes: doesnt work. EDIT: Doesn't work: I'mean there is no checkboxes to select. There is only options for sorting A-Z and Z-A. How to fix this? I can sort data, I can filter by entering single value, but cant filter by multiple values. Thanks in advance. 回答1: The default setting for Access for that filter dialog to show is set at 1000

Relative table links in ms-access

妖精的绣舞 提交于 2019-12-23 20:24:06
问题 I'm sure this must have been asked before, but I can't find it. Can I set a relative path for the location of a linked table in Access 2003? The other table is also stored in an mdb file. These databases will sometimes be connected to via odbc or oledb, so relying on vba code that fires when Access opens the file will not work. If possible I would like to keep the 'splitting' of the database invisible to the programs connecting, rather than them having to check each time that the correct

ODBC continually prompts for password

瘦欲@ 提交于 2019-12-23 20:10:45
问题 I have an application built in Access 2003 that uses a system DSN ODBC to connect to a SQL Server. The ODBC uses SQL authentication. When the application is started, the user is prompted to authenticate into the database. I have another computer set up within the same domain that has Access 2007 installed on it. I log in using the same credentials that I use to get on the machine that has Access 2003. I converted my application to Access 2007 format and everything works fine. However, when

MS SQL-Server: cannot ODBC- connect on Windows 7?

孤街浪徒 提交于 2019-12-23 18:26:22
问题 I have a problem creating an ODBC data source connection for SQL-Server on Windows 7. Problem summary: ODBC datasource connection can be created for the "master" database only, not for an additional, arbitrary database. I have googled around the Net and haven't found a solution. Here are the details: I have MS SQL Server installed on a Windows 7 64-bit system. Details: SQLEXPRESS edition, version: 10.1.2531.0, build: 2007.100.2531.0, Instance ID: MSSQL10.SQLEXPRESS. Using "SQL Server

How to check if a database exists with ODBC

自作多情 提交于 2019-12-23 18:00:59
问题 Hello fellow programmers I have been searching the internet for a few days now and can't find a generic method to solve this with only ODBC and SQL. Is there a way to see if a database already exist, only using ODBC . It has to be standard SQL because the user can chose a DSN of his choice (meaning his own SQL Server). This means I can't check the master table on the server because they are named different on different SQL servers. Thanks. 回答1: Don't know if this is too late, or even

howto connect to as400 with PHP

扶醉桌前 提交于 2019-12-23 17:16:51
问题 I am trying to connect my AS400 with V5R3 with PHP using this code : <?php $server="Driver={Client Access ODBC Driver (32-bit)};System=xxx.xxx.xxx.xxx; Uid=user;Pwd=password;"; #the name of the iSeries $user="user"; #a valid username that will connect to the DB $pass="password"; #a password for the username $conn=odbc_connect($server,$user,$pass); #you may have to remove quotes #Check Connection if ($conn == false) { echo "Not able to connect to database...<br>"; } #Query the Database into a

connecting to DB2 database:[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed

牧云@^-^@ 提交于 2019-12-23 16:51:45
问题 odbc.ini: [DEFAULT] Driver = DB2 [abc] Driver = DB2 [dsn_test1] DESCRIPTION = Connection to DB2 Driver = db2 odbcinst.ini: [DB2] Description = DB2 Driver Driver = /home/user/sqllib/lib/libdb2.so fileusage=1 dontdlclose=1 [ODBC] Trace=1 TraceFile=/home/user/sqllib/trace.out db2cli.ini [abc] hostname="hostname" pwd="passwd" port="port" PROTOCOL=TCPIP database="dbname" uid="uid" $ ./isql abc +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | |

Intermittent SQL Server ODBC Timeout expired

懵懂的女人 提交于 2019-12-23 16:36:54
问题 We have a bunch of VB6 applications that access two different database servers (both 32-bit windows 2003, one SQL Server 2000, one SQL Server 2005). About every ten minutes or so, we are getting a few errors: [Microsoft][ODBC SQL Server Driver]Timeout expired [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. [Microsoft][ODBC SQL Server Driver]ConnectionRead() This is happening on more than a dozen different computers at random times. We also have IP

ODBC must declare the scalar variable

走远了吗. 提交于 2019-12-23 16:13:59
问题 Consider the code below: string ConnectionString = "dsn=mysql;uid=sa;DATABASE=userdb;"; string qryStr = "insert into info(code) values(@code);"; OdbcConnection con = new OdbcConnection(ConnectionString); OdbcCommand cmd = new OdbcCommand(qryStr,con ); cmd.Parameters.Add("@code", System.Data.Odbc.OdbcType.Int).Value = "999"; cmd.Connection.Open(); OdbcDataReader odbcdtr = cmd.ExecuteReader();//exception "must declare the scalar variable @code" con.Close; This code is raising exception "must