.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Odbc GetSchemaTable DataType Isn't DbType

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :.NET Framework
According to this article the DataType column on the GetSchemaTable from an Odbc data reader should be DbType but when I run a query using Odbc the type is a system type. http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcdatareader.getschematable.aspx I'm using the meta data to create a table in a different database on a different server of a different type (e.g. the query is run on MSSQL but the create table is for PostgreSQL).

View Complete Post

More Related Resource Links

ODBC API to retrieve User-Defined DataType of a Column in a ResultSet ?



ODBC APIs such as SQLDescribeCol(), SQLColAttribute() could be used to retrieve SQLDataType of a particular column in a ResultSet.

Similarly, Is there any ODBC API which could be used to retrieve User-Defined DataType of a particular column in a ResultSet?



What is CultureInfo datatype?


Hi all members!

        whats  Cultureinfo datatype.Please help to know clearly..I ve seen more Sites but i can't able to understand guys!!

        Ex:("CultureInfo culture = new CultureInfo( "hi-IN" );")Embarassed

ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Function name is missing ).


I Am Continiously Getting Error For Following Line Of Code, It Work  Fine In Other Database

Am I Doing Any Mistake

if (sh3itno != "" && dpsh3no != "")
                string queryy = "SELECT [CHEQNO] FROM [SH3MAST] WHERE (([CHEQDATE] = " + chqdate + ") AND ([FAVOUR] = " + favour + ") AND ([CHQTYPE] = " + ctype + ") AND ([TRSTN] = " + trstn + ") AND ([TRBANK] = " + trbank + ") AND ([SH3ITNO] = " + sh3itno + ") AND ([DPSH3NO] = " + dpsh3no + "))";
                OdbcCommand cmd3 = new OdbcCommand(queryy, connen1);
                string chqno =cmd3.ExecuteScalar().ToString(); (Here Iam Getting Error)
                tbl.Rows[i]["cheque no"] = chqno;
Stack Trace: 

[OdbcException (0x80131937): ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Function name is missing ).]
   System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +39
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, Strin

Basic ODBC Connection to connect to Crystal ???


I have visual studio 2008 professional with the inbuilt crystal reports version 10 I think.  I create everything from my laptop and IIS runs from my laptop as well.

I have created the most basic report to try and figure out a problem I have, anyways the report contains one database field that is it .... which I connect to by ODBC.  I then create a web form add the crystal report viewer to the report and the crystal report source run the web page and it loads the data from the field as I would expect to the crystal report viewer !!

I have several ODBC connections setup on my machine one using integrated security the other using SQL authentication both are system DSNs.  Now when I publish my application and access it from IIS and not the localhost I can access everything from my application ok except when I go to form that has the crystal reports I get this error (ODBC used here is the 'sa' account)

Logon failed. Details: IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Error in File

If I use the other ODBC that uses Windows authentication I get this error message

Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database  requested by the login. T

persist security info not available by a codebase odbc driver



I want to interface the software Sage ventpartner with sharepoint.

For that i have to use the odbc {codebaseStand} driver and i know that the following string is working :


The pb is when i construct my bdc xml file i have to enter :

        <Property Name="rdbconnectionDriver" Type="System.String">{CodeBaseOdbcStand}</Property>
        <Property Name="rdbconnectiondbq" Type="System.String">c:\ventpart\database</Property>
        <Property Name="rdbconnectionuid" Type="System.String">administrateur</Property>
        <Property Name="rdbconnection Trusted_Connection " Type="System.String">yes</Property>
        <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider">Odbc</Property>
        <Property Name="SsoApplicationId" Type="System.String">23</Property>

Store Null Data In image datatype in sql server 2005



i wanted to store image in sqlserver database image field and i did. But now in some cases i want to store null value in that image field please let me know how to do this using file uploader.please give complete sample code.


SQL Server doesn't exist or access denied while connecting with Access 2010 ODBC

Hello all. I am using Access 2010 and SQL Server 2008 (locally). I can easily connect to server using SSMS and it works excellent. But when I want to import a table to Access 2010 using ODBC, it says that "SQL Server doesn't exist or access denied". It worked previously - almost 3 days ago, but now, it doesn't! Please help! Thanks Mohammad Javahery

Can't Create ODBC to Local SQL Server Express 2008

Hello. I have SQL Server Express 2008 SP1 LOCALLY on my Windows XP Professional SP3 box. I have databases already created in Access 2007 that I imported into SQL. Now I want to keep the front end Access forms for data entry but have them connect to the databases in SQL. What I can't seem to do is connect from Access to the SQL db's because I can't create the ODBC connection. When I try to connect, I get the following two 'Connection failed' errors: 1. SQLState: '08001' SQL Server Error: 10061 [Microsoft][SQL Server Native Client 10.0]TCP Provider: No connection could be made because the target machine actively refused it. 2. SQLState: 'HYT00' SQL Server Error: 0 [Microsoft][SQL Server Native Client 10.0]Login timeout expired Additionally, this information may help. 1. Windows firewall is turned off. 2. In SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for SQLEXPRESS, Shared Memory, Named Pipes and TCP/IP are all 'Enabled'. The order is Shared Memory (1), Named Pipes (2) and TCP/IP (3). 3. In SQL Server Configuration Manager > SQL Native Client 10.0 Configuration > Client Protocols, the above three are also 'Enabled'. The order is Shared Memory (1), Named Pipes (2) and TCP/IP (3). Double-clicking TCP/IP tells me that the default port is 1433. 4. Running "netstat -ano", I see no entries for [myIPaddress]:1433.

Query on XML datatype in SQL Server 2008

Hi All, In table I have column with XML datatype. I can able to read the below XML tag. SET   @Title = CAST(@XMLContent.query('data(root/chemicalName)') AS VARCHAR(50)) <root><chemicalName>Sulphuric acid</chemicalName></root> but how can I read (in SQL Server 2008) with multiple rows in it, and how to know the list of child nodes and data of it dynamically? <Root> <Row> < CurrencyCode>GBP</CurrencyCode> < CurrencyName>POUND (STERLING)</CurrencyName> </ Row> <Row> < CurrencyCode>INR</CurrencyCode> < CurrencyName>Rupee</CurrencyName> </ Row></

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

Connectivity Issue through ODBC

Here's the scenario: On the server: (Windows 2003, sql server 2005 sp 3) 1. named server is running on port 1433 2. all protocols except VIA is enabled 3. Remote Connections is enabled for both tcp and named pipes on surface area configuration 4. SQL Browser is running 5. Windows Firewall is disabled 6. Network firewall has allowed TCP traffic to port 1433, one way. 7. can ping the client 8. Local Securty Policy to access this computer from the network is permitted to everyone 9. SQL User and windows user can login to the server 10. No login failed connections on the error logs On the client: (WIndows XP sp2) 1. server can be ping 2. telnet server 1433 is successful 3. NSlookup can resolve server name 4. System DSN and USer DSN using SQL Server driver works to other servers Creating a DSN to the server results to Connection Failed:  SQL State 01000' SQL Server Error: 53 [Microsoft][ODBC SQL DRIVER] [DBNETLIB] CONNECTION.OPEN(CONNECT()). CONNECTION FAILED SQL STATE '08001' SQL SERVER ERROR 17 [Microsoft][ODBC SQL DRIVER] [DBNETLIB]Server Does not Exists or access is denied. What am I Missing here?

ODBC Driver for SQL Server Compact Edition

I know that there is no ODBC driver available for SQL Server Compact Edition version 3.5.  Do you plan to add an ODBC driver in future release? If yes, is it high in your priority list?   The scenario why I am looking for an ODBC driver is to connect an MS Access application to a SDF file instead of MDB file.  This will enable me to easily sync the SDF file with SQL server repository using the new Data Sync Services.   Mario Cardinal MVP Solutions Architect

ODBC call failed

I try to export a table from Access 2007 to SQL-Server Express 2008R2 and it returns the error: ODBC call failed. [Microsoft][SQL Server Native Client 1.0][SQL Sever] Line1: Specifed Scale 1 is invalid (#1002). The problem is related with a datetime column, because if I drop this column it is possible to export. Thanks for your help.    

SQL Server 2008, ASP Classic, IIS and ODBC.

Hi.   I'm using Windows XP SP3 SQL Server 2008 Login:sa Password:12345 http://img2.pict.com/9d/b2/65/3153366/0/sql.jpg   ODBC - Am I doing it correctly? http://img2.pict.com/ee/6b/8b/3153363/0/800/odbc.jpg   Loading the 'Main.asp' file and got this error;   http://img2.pict.com/cd/8e/ad/3153435/0/800/ptb.jpg   Line 106 refers to the underline text below; (cn.Open "DSN=Trains;UID=sa;PWD=;DATABASE=Trains") &lt;%@ Language=VBScript %&gt; &lt;% Response.Buffer = True Response.Expires = -1000 %&gt; &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Main Page&lt;/TITLE&gt; &lt;base target="_self"&gt; &lt;BODY bgProperties=fixed bgColor=#FFFFFF leftMargin=0 topMargin=0 bottommargin10&gt; &lt;DIV style="LEFT: 5px; POSITION: absolute; TOP: 80px"&gt;&lt;/DIV&gt; &lt;style type="text/css"&gt; body           {font-size: 8pt; font-family: verdana; color:white;} table, tr, td  {font-size: 10pt; font-family: verdana; color: black;} a:link         {font-size: 8pt; font-family: verdana; color:black; text-decoration: none;} a:visited      {font-size: 8pt; font-family: verdana; color:black; text-decoration: none;} a:

OMPM script cannot find ODBC Driver

I'm setting up a local OMPM (Office Migration Planning Manager) application, which requires an SQL Server database. I installed SQL Server Express successfully. When I run the OMPM script to create the database (CreateDB.bat) I get the following error: SQL-DMO Install Required: This operation requires the SQL Server ODBC Driver, version 3.80 or later, which comes with SQL Server 2000, SQL Server 2005 and SQL Server Express. I installed SQL Server Express with this file "SQLEXPR32_x86_ENU.exe" Could it be that the ODBC Driver was not registered correctly during the install of SQL Server Express? Alternatively, where can I find the missing driver? Thanks in advance, Maurice

Insert/Update OLE Attachment(Binary datatype) using SQL server 2000

Hi All, In the same senario how we can Insert/Update OLE Attachment(Binary datatype)  from one source table to other destination table by using SQL Server 2000 not with C# fronend code. Appreciated if you can give fix on this regads, Divakar.

odbc connection failed

i have microsoft sql server 2000. i am using program based on VB.when i try to run the components like  import database design, link table, etc then the message get displayed " ODBC connection failed".please give me the solution.please.....
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend