Search Results

Search found 572 results on 23 pages for 'odbc'.

Page 8/23 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Couldn't get last insert identifier symfony sql server through ODBC

    - by JaSk
    Im getting that error every time I try to add a new set of data to my sql server 2008 database. I'm running windows 7 on my development machine. my current config is: all: doctrine: class: sfDoctrineDatabase param: dsn: 'odbc:Driver={SQL Server Native Client 10.0};Server=localhost;database=jobeet;' username: sa password: **** thanks to every one.

    Read the article

  • Can I indicate where my MySQL parameter should go more meaningfully than just having a ? to mark the

    - by Paul H
    I've got a chunk of code where I can pass info into a MySQL command using parameters through an ODBC connection. Example code showing surname passed in using string surnameToLookFor: using (OdbcConnection DbConn = new OdbcConnection( connectToDB )) { OdbcDataAdapter cmd = new OdbcDataAdapter( "SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?", DbConn); OdbcParameter odbcParam = new OdbcParameter("surname", surnameToLookFor); cmd.SelectCommand.Parameters.Add(odbcParam); cmd.Fill(dsCustomers, "customers"); } What I'd like to know is whether I can indicate where my parameter should go more meaningfully than just having a ? to mark the position - as I could see this getting quite hard to debug if there are multiple parameters being replaced. I'd like to provide a name to the parameter in a manner something like this: SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?surname ", When I try this it just chokes. The following code public System.Data.DataSet Customer_Open(string sConnString, long ld) { using (MySqlConnection oConn = new MySqlConnection(sConnString)) { oConn.Open(); MySqlCommand oCommand = oConn.CreateCommand(); oCommand.CommandText = "select * from cust_customer where id=?id"; MySqlParameter oParam = oCommand.Parameters.Add("?id", MySqlDbType.Int32); oParam.Value = ld; oCommand.Connection = oConn; DataSet oDataSet = new DataSet(); MySqlDataAdapter oAdapter = new MySqlDataAdapter(); oAdapter.SelectCommand = oCommand; oAdapter.Fill(oDataSet); oConn.Close(); return oDataSet; } } is from http://www.programmingado.net/a-389/MySQL-NET-parameters-in-query.aspx and includes the fragment where id=?id Which would be ideal. Is this only available through the .Net connector rather than the ODBC? If it is possible to do using ODBC how would I need to change my code fragment to enable this?

    Read the article

  • How can you connect to a password protected MS Access Database from a Spring JdbcTemplate?

    - by Tim Visher
    I need to connect to a password protected MS Access 2003 DB using the JDBC-ODBC bridge. I can't find out how to specify the password in the connect string, or even if that is the correct method of connecting. It would probably be relevant to mention that this is a Spring App which is accessing the database through a JdbcTemplate configured as a datasource bean in our application context file. Some relevant snippets: from application-context.xml <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="legacyDataSource" /> </bean> <bean id="jobsheetLocation" class="java.lang.String"> <constructor-arg value="${jobsheet.location}"/> </bean> <bean id="legacyDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${jdbc.legacy.driverClassName}" /> <property name="url" value="${jdbc.legacy.url}"/> <property name="password" value="-------------" /> </bean> from our build properties jdbc.legacy.driverClassName=sun.jdbc.odbc.JdbcOdbcDriver jdbc.legacy.url=jdbc:odbc:Driver\={Microsoft Access Driver (*.mdb)};Dbq\=@LegacyDbPath@;DriverID\=22;READONLY\=true Any thoughts?

    Read the article

  • Batch Inserts And Prepared Query Error

    - by ircmaxell
    Ok, so I need to populate a MS Access database table with results from a MySQL query. That's not hard at all. I've got the program written to where it copies a template .mdb file to a temp name and opens it via odbc. No problem so far. I've noticed that Access does not support batch inserting (VALUES (foo, bar), (second, query), (third query)). So that means I need to execute one query per row (there are potentially hundreds of thousands of rows). Initial performance tests show a rate of around 900 inserts/sec into Access. With our largest data sets, that could mean execution times of minutes (Which isn't the end of the world, but obviously the faster the better). So, I tried testing a prepared statement. But I keep getting an error (Warning: odbc_execute() [function.odbc-execute]: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect , SQL state 07001 in SQLExecute in D:\....php on line 30). Here's the code I'm using (Line 30 is odbc_execute): $sql = 'INSERT INTO table ([field0], [field1], [field2], [field3], [field4], [field5]) VALUES (?, ?, ?, ?, ?, ?)'; $stmt = odbc_prepare($conn, $sql); for ($i = 200001; $i < 300001; $i++) { $a = array($i, "Field1 $", "Field2 $i", "Field3 $i", "Field4 $i", $i); odbc_execute($stmt, $a); } So my question is two fold. First, is there any idea on why I'm getting that error (I've checked, and the number in the array matches the field list which matches the number of parameter ? markers)? And second, should I even bother with this or just use the straight INSERT statements? Like I said, time isn't critical, but if it's possible, I'd like to get that time as low as possible (Then again, I may be limited by disk throughput, since 900 operations/sec is high already)... Thanks

    Read the article

  • Update Billing Email Addresses in Sage MAS90

    - by ThaKidd
    I have been tasked with trying to find a method of updating about 500 customer email addresses in MAS90. I recently discovered that they had the ability to email invoices to their customers and because I opened my big mouth, they now want me to find a way to add about 500 emails into the system so they do not have to perform the task manually. The office does have an SQL server which supports ASP sites which contains a list of all of the current email addresses. My plan was to use Microsoft Access 2007 with the MAS90 ODBC connector to attempt this update. My questions are: Is this the right way to go or is there a better method of obtaining these results? Does anyone happen to know which tables I should be looking at? Any and all help is appreciated. Thanks in advance!

    Read the article

  • How to reference individual cells in Excel to variable data from records in an external SQL table

    - by user273476
    I have a SQL table containing date oriented financial data eg. multiple daily records with fields for Date, Account code and Value. I want to set up dynamic links (formulas) from cells in an Excel speadsheet to this data so when the spreadsheet is loaded the data is fetched from all the relevant records. The spreadsheet has the Account codes on the x axis and Dates on the y. Each day the SQL table has new data in it for the new day and I want the spreadsheet to reference this new data for the column for the new day. Any ideas? I have seen how you can generally bring in data from a SQL table (in our case using ODBC as it is not MS SQL) but the data is not simply bringing in multiple records as you would a CVS file but specific records in the SQL table referencing to specific cells and columns in the spreadsheet.

    Read the article

  • La préversion du pilote ODBC SQL Server pour Linux disponible, avec des outils pour SQLCMD et pour importer et exporter des données

    La préversion du pilote ODBC SQL Server pour Linux disponible avec des outils pour importer, exporter des données et exécuter des requêtes et scripts Comme l'avait annoncé Microsoft lors de son salon Pass Summit 2011, la préversion (CTP1) de son pilote ODBC (Open Database Connectity) SQL Server pour les systèmes d'exploitation Linux est disponible. Ce driver devrait permettre aux développeurs C et C++ de se connecter à SQL Server à partir des plateformes Linux et fournir un mécanisme pour que les applications et bibliothèques d'exécution (runtimes) puissent accéder à SQL Server. Pour l'instant, cett...

    Read the article

  • Sybase ODBC connection String with .net

    - by nitinkhanna
    Hi, I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string. I have used the connectionstrings.com but unable to get the correct one. After runnig and making the connection Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass; and some other combination of thic connection string I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed What am I suppose to correct in that. Please help. Thanks

    Read the article

  • Option Value Changed - ODBC Error 2169

    - by fredrick-ughimi
    Hello Edgar, Thank you for your response. I am using Powerbasic (www.powerbasic.com) as my compiler and SQLTools as a third party tool to access ADS through ODBC. I must stat that this error also appers when I take other actions like Update, Delete, Find, etc. But I don't get this error when I am using MS Access. Here is my save routine: [Code] Local sUsername As String Local sPassword As String Local sStatus As String Local sSQLStatement1 As String sUsername = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME) If Trim$(sUsername) = "" Then MsgBox "Please, enter Username", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME Exit Function End If sPassword = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD) If Trim$(sPassword) = "" Then MsgBox "Please, enter Password", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD Exit Function End If sStatus = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_CBOSTATUS) sSQLStatement1 = "INSERT INTO [tblUsers] (Username, Password, Status) " + _ "VALUES ('" + sUsername + "','" + sPassword + "','" + sStatus +"')" 'Submit the SQL Statement to the database SQL_Stmt %SQL_STMT_IMMEDIATE, sSQLStatement1 'Check for errors If SQL_ErrorPending Then SQL_MsgBox SQL_ErrorQuickAll, %MSGBOX_OK End If [/code] Best regards,

    Read the article

  • User cannot access a system DSN on Windows Server 2008

    - by Ra Osolage
    We run our SQL Server services using a low privileged domain account. That account is NOT a local admin on the OS. Only access I give the user account is assigned during install of SQL: full control over its mount points and then everything else is granted by the SQL Server 2005/2008 installer. I need to create a linked server in SQL Server 2008 to an ODBC data source. So I remoted into the computer using my domain account, which is part of a group that DOES have local admin privs to the OS. I created a system DSN and configured it to connect to another SQL Server. The DSN works perfectly when I test it. However, when I try to create the linked server, I get an error. It appears to me that the DSN is invisible to the domain account that SQL Server is running as. It seems that this problem is only happening to me on Windows 2008 servers. Does anybody know whether there's anything that you need to do after creating a DSN to make it visible for other users to access?

    Read the article

  • User cannot access a system DSN on Windows Server 2008

    - by Ra Osolage
    We run our SQL Server services using a low privileged domain account. That account is NOT a local admin on the OS. Only access I give the user account is assigned during install of SQL: full control over its mount points and then everything else is granted by the SQL Server 2005/2008 installer. I need to create a linked server in SQL Server 2008 to an ODBC data source. So I remoted into the computer using my domain account, which is part of a group that DOES have local admin privs to the OS. I created a system DSN and configured it to connect to another SQL Server. The DSN works perfectly when I test it. However, when I try to create the linked server, I get an error. It appears to me that the DSN is invisible to the domain account that SQL Server is running as. It seems that this problem is only happening to me on Windows 2008 servers. Does anybody know whether there's anything that you need to do after creating a DSN to make it visible for other users to access?

    Read the article

  • Strategy for Incremental Datasource fetchings in Excel

    - by user1352530
    I am in an scenario with a table that is refresh by a third app every week. I need to keep accumulating all data in Excel, using an ODBC connection to the database. I am wondering Approach 1: Is there a way to force Excel to append results for every update (this update would be triggered according to a parameter that indicates week)? I tried to define the table for which the connection loads using a dynamic reference but once is anchored first time, table position is never redefined Approach 2: Use an ETL to accumulate all weekly results into a staging table and then connect Excel to it in real time. But, I would need a mechanism for caching old data, as I cannot grow exponentially the time Excel opens. Imagine after 10 years, Excel would need to update at opening 10 years fo data before showing it. Is there a way to store already fetched data and increment it at real time (when book is opened) by selecting new data (with a query/filter of something) Thanks EDIT: Maybe it's better to ask it that way: What is the optimal strategy for a table that keeps growing and needs to be read in real time by Excel? I just don't want to fetch absolutely all data after some months...

    Read the article

  • "Executing SQL directly; no cursor" error when using SCOPE_IDENTITY/IDENT_CURRENT

    - by Chris
    There wasn't much on google about this error, so I'm askin here. I'm switching a PHP web application from using MySQL to SQL Server 2008 (using ODBC, not php_mssql). Running queries or anything else isn't a problem, but when I try to do scope_identity (or any similar functions), I get the error "Executing SQL directly; no cursor". I'm doing this immediately after an insert, so it should still be in scope. Running the same insert statement then query for the insert ID works fine in SQL Server Management Studio. Here's my code right now (everything else in the database wrapper class works fine for other queries, so I'll assume it isn't relevant right now): function insert_id(){ return $this->query_first("SELECT SCOPE_IDENTITY() as insert_id"); } query_first being a function that returns the first result from the first field of a query (basically the equivalent of execute_scalar() on .net). The full error message: Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Executing SQL directly; no cursor., SQL state 01000 in SQLExecDirect in C:[...]\Database_MSSQL.php on line 110

    Read the article

  • Delphi connection to OpenEdge Progress-4GL Database

    - by Cesar Marrero
    Folks: Has anyone had success connecting to a Progress-4GL database with Delphi?   I've been unable to establish any connection with the ODBC driver provided by the vendor (Progress OpenEdge 10.1C Driver). I've entered (what I believe are) the right parameters, but keep on getting an error whenever I test the connection: "[DataDirect][ODBC Progress OpenEdge Wire Protocol driver] Socket closed." Background: I've been tasked to re-design a 13-year-old application, but the original programmer did not provide any supporting documents, passwords, configuration setup, etc. (I'm on my own)!   To make things worse, online help and useful documentation about Progress is scarce (I had never heard about this database until now). I want to examine the existing data, maybe create an ERD to familiarize myself with the schema, but I can't even access the data outside of the OpenEdge code. Any help is appreciated!

    Read the article

  • how to set charset for MySQL in RODBC

    - by lokheart
    I have a data with chinese characters as field names and data, I have imported them from xls to access 2007 and export them to ODBC. Then I use RODBC to read them in R, the field names is OK, but for the data, all of the chinese characters are shown as ?. I have read the RODBC manual and it said: If it is possible to set the DBMS or ODBC driver to communicate in the character set of the R session then this should be done. For example, MySQL can set the communication character set via SQL, e.g. SET NAMES 'utf8'. I guess this is the problem, but how can I provide this command to MySQL via RODBC? Thanks!

    Read the article

  • MDE Access decrypt JDBC

    - by michelemarcon
    I want to perform JDBC SQL queries on a MDE Access file. I've set up the data source ODBC and everything worked well for a MDE file. Now, I'm working with a newer version of the MDE file, and here is the result: java.sql.SQLException: [Microsoft][Driver ODBC Microsoft Access] Cannont read record. Read authorization unavailable for "tbl_mytable". If I open the MDE with Access Runtime I am asked for a password, and after leaving a blank password I can see all the data. Of course, "tbl_mytable" does exist inside the database.

    Read the article

  • Connect rails application to MsSQL 2005 from Windows

    - by Enrico Carlesso
    Hi guys. I (sadly) have to deploy a rails application on Windows XP which has to connect to Microsoft SQL Server 2005. Surfing in the web there are a lot of hits for connect from Linux to MsSQL, but cannot find out how to do it from Windows. Basically I followed these steps: Install dbi gem Install activerecord-sql-server-adapter gem My database.yml now looks like this: development: adapter: sqlserver mode: odbc dsn: test_dj host: HOSTNAME\SQLEXPRESS database: test_dj username: guest password: guest But I'm unable to connect it. When I run rake db:migrate I get IM002 (0) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I'm not a Windows user, so cannot understand really well the meaning of dsn element or so. Does someone have an idea how to solve this? Thanks in advance

    Read the article

  • C++ Access to SQL Server from Linux

    - by Meloun
    I need to write some data to SQL Server database from Linux in c++. I found this sqlapi.com But I think, at first ODBC driver has to be installed an has to work. I folowed this adminlife.net/allgemein/mssql-zugriff-unter-debian-etch-mit-unixodbc-und-freetds/ or this http://b.gil.megiteam.pl/2009/11/linux-odbc-to-mssql/ But it didnt work, the port 1433 seems to be closed ($ sudo nmap -PN -sU -p 1433 192.168.56.101 - port "filtered") isql -v sqlexpress sa - wait with no response or get "couldn't connect to sql" From other PC with Windows I have no problem to write data in SQL Server, so server should be right configured to remote access. any idea?

    Read the article

  • C++ Access to MSSQL from Linux

    - by Meloun
    Hi, I need to write some data to mssql database from linux in c++. I found this sqlapi.com But I think, at first ODBC driver has to be installed an has to work. I folowed this adminlife.net/allgemein/mssql-zugriff-unter-debian-etch-mit-unixodbc-und-freetds/ or this http://b.gil.megiteam.pl/2009/11/linux-odbc-to-mssql/ But it didnt work, the port 1433 seems to be closed ($ sudo nmap -PN -sU -p 1433 192.168.56.101 - port "filtered") isql -v sqlexpress sa - wait with no response or get "coulndt connect to sql" From other PC with Windows I have no problem to write data in mssql, so server should be right configured to remote access. any idea?

    Read the article

  • Connection to .mdb file fails on windows 2008 core - 32bit

    - by amritad
    Hi, I have an application where I am doing connection with .mdb file. Here are the steps we are following : Creating object for database utils inteface Calling the connect() function, to get connected to the database whose extension is .mdb file Above flow is working correct on all windows platform but not on windows server 2008 CORE 32-bit. I also checked whether the ODBC drivers are installed or not, by opening regedit. I found that all drivers specially Microsoft access driver (*.mdb) is installed. ANd I think it is by default get installed while installing OS. Is anyone aware of any thing about ODBC drivers and connectivity to the database (like .mdb) on windows 2008 CORE ( which runs only on command line and no interface)

    Read the article

  • Adding data sources for unixODBC/isql on Mac OSX Lion

    - by NP01
    I have installed unixODBC from source and mysql-odbc connector from .dmg installer on Mac OSX Lion. This was done a while ago, and at that time I successfully installed a data source (let's call it foo). Now I am trying to add another data source (DSN). I've done this through both ODBC Manager and the command-line tool myodbc-installer given with the tar bundle of the mysql-odbc connector from the mysql website. An entry shows up in /Library/ODBC/odbc.ini, which looks like this: [ODBC Data Sources] bar = MySQL ODBC 5.1 Driver [ODBC] Trace = 0 TraceAutoStop = 0 TraceFile = TraceLibrary = [myodbc] Driver = /usr/local/lib/libmyodbc5.so SERVER = localhost PORT = 3306 [bar] Driver = /usr/local/lib/libmyodbc5.so Description = DATABASE = bar However, isql fails to find it: anitya:Preferences neil$ isql bar bar bar -v [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect Weird thing is, the old DSN foo, which is not to be seen in /Library/ODBC/odbc.ini or /etc/odbc.ini, works fine: anitya:Preferences neil$ isql foo foo foo +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> I'm miffed about where the DSN entries need to be entered on OSX Lion to be found by isql. Thanks in advance for your help!

    Read the article

  • How do I install informix odbc on windows server 2003/2008?

    - by zombiegx
    I installed the informix client sdk on my pc (32 bit) and on the server, I could create an odbc connection on my pc easily, but on both windows 2003 and 2008 (64 bit) I can't. I don't know if there is a 64 bit sdk, maybe this is the issue. But I haven't found what to do. I need to use odbc since using the sdk by itself hangs IIS, and according to this post http://forums.asp.net/p/1269896/2425034.aspx#2425034 the solution is to use odbc. thanks

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >