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


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

ODBC Spec: SQLGetInfo call with valid buffer and zero bufferlength ?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :
 

Hi,

ODBC Spec is not clear for me on:
SQLGetInfo call with valid buffer and zero bufferlength.

As of now I see a SQL_SUCCESS, but this should return a SQL_SUCCESS_WITH_INFO. In my scenario the StringLengthPtr returned is around 4K.

====

#define KEYWORDBUFFERMAXLEN  16000
...
int LenToTry;
SQLSMALLINT KeywordBufferLen = KEYWORDBUFFERMAXLEN;
TCHAR KeywordBuffer[KEYWORDBUFFERMAXLEN];
SQLSMALLINT KeywordListLen = -4711;
...
rc = m_pOdbc->GetInfo(m_pHdbc, SQL_KEYWORDS, &KeywordBuffer, LenToTry, &KeywordListLen);
...

====

Experts, please help me with correct information.

Regards,

Ramu





View Complete Post


More Related Resource Links

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.    

extracting from multiple tables in an odbc call/ssis

  
Hi,   I have an odbc for DBISAM, and can use it to import into sql server, but only one table at a time.  (when it get's to the choose table screen, it will only let me create a single SQL query.   does anyone know if I can extract from multiple tables using this?   If not - what would I need to change in the DTSX file so that my query goes from "select * from tablea" to "select * from tableb" and the destination table is also "tableb"?   also - can the DTSX file be change to run for multiple tables?

ODBC--call failed.[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismat

  
I need to establish a connection between an Access 2003 database (32 bit) and an 11g 64 bit Oracle database on a server. I am running Windows 7 on a 64 bit laptop. I did a clean install of Oracle 11g for 64 bit. I have no problem accessing the Oracle database via the Oracle SQL Developer. I just have a problem from within Access. I hope someone can help me. I've been fighting this for several months. Thanks in advance!

ODBC Call Failed - Error 3151

  

We have an Access database migrated from Access 97 to Acces 2007 with some linked tables to an SQL Server 2008 database. We are using a File DSN in the ODBC Administrator. Connection tests work fine there. In fact, we have a main form in the Access 2007 application that shows the data always correctly. The problem appears when we execute a task that makes the following call:

Dim dbs As Database
Dim rstAppend As Recordset

Set dbs = CurrentDb
Set rstAppend = dbs.OpenRecordset(strAccessTable, dbOpenDynaset, dbSeeChanges)

OpenRecordset throws the error number  3151 and occurs randomly but it appears quite frequently.  It's sporadic. When we don't get the error, the task works fine.

  1. It not happens always, mosty we're fine.
  2. When it happens it happens for all subsequent tasks tried. We have to close and reopen the Access database and pray to the good Lord that it works.

using odbc 3.51 connector , i need to call stored proceedure from visual studio

  

I have visual studio 2008 , and i have connected to mysql with odbc 3.51 driver. i am creating a login page, in which i pass the username and password from textbox to parameter and transfer it to the stored proceedure.The code in the login page is

protected void btnclick_Click(object sender, EventArgs e)
   
   
   {
        try
        {
            OdbcCommand cmd = new OdbcCommand();
            cmd = myconnection.con.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "pro_Login";
            cmd.Parameters.Add("PrmUserName", OdbcType.VarChar, 50);
            cmd.Parameters.Add("PrmPassword", OdbcType.VarChar, 25);
            cmd.Parameters["PrmUserName"].Value = txtusername.Text;
&n

odbc call failed

  

Hi
when i try to run a query appeare the next error:

ODBC Call Failed

The query is a JOIN with a table on SQL Server 2005 and another query in the same project Access. I can read the query and table alone without any error and with tha same ODBC, when i JOIN this element appeare this error. My access version is 2007 and SQL Server is 2005 SP3.
How can i solve this situation?

--
Enrico Zerilli
enricozerilli@hotmail.com

 


EZ BizTalk Specialist

ODBC Call Failed

  

Hi
when i try to run a query appeare the next error:

ODBC Call Failed

The query is a JOIN with a table on SQL Server 2005 and another query in the same project Access. I can read the query and table alone without any error and with tha same ODBC, when i JOIN this element appeare this error. My access version is 2007 and SQL Server is 2005 SP3.
How can i solve this situation?

--
Enrico Zerilli
enricozerilli@hotmail.com

 


EZ BizTalk Specialist

Using a CompareValidator to check input is a valid date

  
The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

How to call an .exe file in .net

  
Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

ReportViewer :: Failed to enable constraints. But my statement is valid!!

  
  • A
  • n error has occurred during report processing.
      • Exception has been thrown by the target of an invocation.
        • Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

    Why do I keep getting this error, even when not using any data on the report. When I run the query in SQL server I get a resultset. However when I try to render the report I get this error.

    Thanks!


    Path not valid.

      

    hi

    im trying to save a file, filename as current date and time.it will give an error.

    any ideas.

    here is my code

    string datetime=DateTime.Now.ToString();

    if (GridviewtoCSV("~/Admin/doc/Reports/" + batchid.ToString() + datetime + ".csv", transactiongrid) && GridviewtoPDF("~/Admin/doc/Reports/" + batchid.ToString() + datetime + ".pdf", transactiongrid))
                    {


    Call MOM: Instrument and Monitor Your ASP.NET Apps Using WMI and MOM 2005

      

    The current version of Windows Management Instrumentation (WMI) satisfies many current and future manageability requirements. In this article Michael Jurek demonstrates how WMI provides important system management capabilities and develops a WMI-aware monitoring solution you can use to instrument your ASP.NET applications. He then introduces the capabilities of MOM 2005 that allow you to monitor these instrumented applications.

    Michael Jurek

    MSDN Magazine September 2005


    Categories: 
    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