odbc

IDbReader throwing exceptions for existing columns

随声附和 提交于 2019-12-12 03:35:47
问题 I'm trying to reader values from a System.Data.Odbc.OdbcDataReader. The problem with it is that it simply doesn't work. When I try to get a value from an existing column (field), it throws an exception. In my cae, FieldCount is 8 , but, for instance, a if I invoke reader.IsDBNull(4), it throws. For values column ids from 0 to 2, it retrieves the correct value. But reader[3] to reader[7], an exception is thrown with no information of what happened. Even worse, this code (GetName) also throws

Editing an imploded string

半腔热情 提交于 2019-12-12 03:32:23
问题 I have an application in which I can assign task like cleaning the bathroom, washing the car and etc. I can assign a single task to let's say 3 to 4 persons using the code below if (isset($_POST["btnassign"])){ $proj = $_REQUEST['projhid']; $analyst = $_POST['analyst']; $commaList = implode('| ', $analyst); $queupass = "UPDATE projects set assignedto='$commaList', assignedby = '$uname' where projectname='$proj'"; $queresupass = odbc_exec($conn,$queupass); $notifassign = "New Project

Unable to connect to SQL Server 2014 using ODBC

点点圈 提交于 2019-12-12 03:28:34
问题 I've set up my first SQL Server 2014 and I am trying to connect to it via ODBC, but I'm getting an error: Microsoft SQL Server Native Client Version 11.00.2100 Running connectivity tests... Attempting connection [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. [Microsoft][SQL Server Native Client 11.0]Login timeout expired [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while

Excel - Microsoft Query - SQL Server login - “Use Trusted Connection” default setting

a 夏天 提交于 2019-12-12 03:02:35
问题 Couple of years using this site is as an invaluable resource, but first time posting. I am having a little trouble with external data connections in Excel, specifically connecting to SQL Server through Microsoft Query. Whenever I click [Get External Data > From Other Sources > From Microsoft Query > Choose Data Source: SQL Server] it takes about 20 seconds before an error pops up: Error 18452 Login Failed Untrusted Domain After I click OK a SQL Server Login dialog box pops up with "Use

ODBC SQL, Using a reserved word in a where clause

半世苍凉 提交于 2019-12-12 02:53:32
问题 I have a problem where I need to search for a value in a ODBC which is a reserved word. So: SELECT * FROM Customer WHERE AccountNumber = 'Sum' In this case, 'Sum' is a reserved word and so I get a syntax error. In access the error is "The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect" Is there a way I can search for such a string? 回答1: Parameterise the string you wish to use as part of the WHERE clause and as I had

Sum function is multiplied by 4

a 夏天 提交于 2019-12-12 02:47:32
问题 I have put in the following code to sum up the values in POLIN.Qtyremn and OELIN.Otyord. It almost works, but instead of just summing the values, it is multiplying the quantities by four and adding them. I think this is being caused by the joins and it is calling the value four times and then adding them. SELECT POLIN.Itemkey, POLIN.Description, POLIN.Location, INLOC.Qtyonhand, Sum(POLIN.Qtyremn), Sum(OELIN.Qtyord) FROM X.dbo.INLOC INLOC, X.dbo.OELIN OELIN, X.dbo.POLIN POLIN WHERE INLOC

Can't connect to local MySQL database using Crystal Reports

给你一囗甜甜゛ 提交于 2019-12-12 02:46:55
问题 I'm trying to create a report using Crystal Reports and that first requires connecting to my local MySQL Database. I'm using this database connector string: Driver={MySQL ODBC 5.3.6 Driver};Server=localhost:3306;Database=mcs;User=admin;Password=admin123;Option=3 I get this error: The connector is installed and the MySQL database is there. 回答1: start >> search microsoft odbc administrator on user dsn click add >> search mysql odbc (if not found close >> right click on microsoft odbc

ODBC for MS Access Setup

拈花ヽ惹草 提交于 2019-12-12 02:42:55
问题 I'm working on getting an ODBC connection in place but would like some assistance in making sure the setup is correct. I'm also hoping I can get some help in writing the PHP code to verify the connection to the DB is working. On a Windows Server 2008 R2 machine, I browse to C:\Windows\SysWOW64 and run odbcad32. (This is where I start getting confused...most pages I've looked at give pretty basic information for this.) The DB is a MS Access file. Which tab do I choose...User DSN...System DSN..

mysql odbc driver works fine on visual studio 2008 but not on visual studio 2010

淺唱寂寞╮ 提交于 2019-12-12 02:36:07
问题 Hey guys i got a problem which is doing my head in, and was hoping someone would be able to point me in t he right direction. I have a c# application which i wrote using visual studio 2008 at the time i installed a mysql odbc 3.51 driver this app worked fine connection to a mysql db on my localhost and let me do what i needed to do. i got a copy of visual studio 2010 from the microsoft dreamspark website installed it, opened the solution to the app i had written in 2008 made some changes ran

repeating OdbcException C#

霸气de小男生 提交于 2019-12-12 02:35:57
问题 I am using OdbcConnection class to connect to an external database. As a part of this process, I am also trying to handle the various exceptions thrown by this class (OdbcException). I find that the OdbcException contains a list called Errors which has multiple OdbcErrors. If I provide wrong credentials, I am able to get the access denied error but they are repeated twice in the errors list. The Errors list contains two errors but they are not unique. At the user end I see : ERROR [HY000]