ODBC - Error

dotnet framework

    Next

  • 1. SqlCommandBuilder unable to Update a dataset
    I am using SqlCommandBuilder to update,insert,delete my data. I can do for insert and delete. My code is string sql=" select * from "+dbname; SqlDataAdapter sdata=new SqlDataAdapter(); sdata.SelectCommand=new SqlCommand(sql,scon); SqlCommandBuilder scom=new SqlCommandBuilder(sdata); sdata.UpdateCommand=scom.GetUpdateCommand(); sdata.RowUpdating+=new SqlRowUpdatingEventHandler(sdata_RowUpdating); sdata.RowUpdated+=new SqlRowUpdatedEventHandler(sdata_RowUpdated); sdata.Update(ds,dbname); but when I reach the SqlRowUpdating Event my event argument command is undefined. But my dataadapter take the update command correctly. How can I solve this problem Thanks for all.
  • 2. How do I change the size of a boundcolumn when in edit mode?
    Hi, I want to change the size of my datagrid fields when I'm editing the record, how can I do this? Is there a property that I can use? Moe <asp:BoundColumn HeaderText="First Name" DataField="firstname" />
  • 3. Access MSysRelationship
    Hi How to get access to Access database table MSysRelationship. Thanks Konrad
  • 4. Use of radio buttons
    Hey fellows, I feel stupid asking this question because I'm sure the answer is so simple but it eludes me. In VB6 a standard practice was to but multiple radio buttons into a groupbox (called a frame) and assign each of the bottons a value. The frame then had the value of the button that was clicked and it's value could be bound to a data source. How the heck do you do that in VB7? There is a GroupBox control and a Panel control that will allow only one radio button to be the one selected but how does one bind that value into a database? I have an application involving persons and I want to have a GroupBox that has two option buttons on it, Male and Female and have the result be stored in as database as Male=0, Female = 1 in a bit column. Can anyone point me in the right direction as to how to do this simple thing? Many thanks. Spence
  • 5. memory leak when quering from SQL server
    Hi I have a query that gets binary info from the SQL Server. The problem is that the query is very large and the process that performs it consumes a lot of memory. Actually it consumes the amount of memory as defined in the SQL Server properties (memory tab). The problem is even bigger, because the process does not release the consumed memory and if I decrease it then i get a lot of page faults. Any help would be appreciated Uzi

ODBC - Error

Postby dnNy » Sat, 25 Mar 2006 09:29:01 GMT

I am getting the followign error when using ODBC from ADO.NET.....
System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server 
Driver][SQL Server]Procedure 'StoredProcedure' expects parameter 
'@Parameter', which was not supplied. 

I installed latest MDAC , still i am getting error...
any help?




Re: ODBC - Error

Postby Paul Clement » Sat, 25 Mar 2006 23:21:02 GMT



I am getting the followign error when using ODBC from ADO.NET.....
System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server 
Driver][SQL Server]Procedure 'StoredProcedure' expects parameter 
'@Parameter', which was not supplied. 

I installed latest MDAC , still i am getting error...
any help?

You're going to have to post your code and the parameter definitions of your stored procedure in
order for us to troubleshoot this problem.

This error has nothing to do with MDAC.


Paul
~~~~
Microsoft MVP (Visual Basic)

Re: ODBC - Error

Postby dnNy » Sat, 25 Mar 2006 23:57:02 GMT

Thanks for your reply , i was saying its problem with MDAC because i was 
going through couple MSDN knowledge base issues and they suggested to install 
the MDAC latest srvice pack...
anyway here is my code.....
Dim db As Database = DatabaseFactory.CreateDatabase("Test")
Dim sqlCommand As String = "dbo.tsp_Test"
Dim dbCommandWrapper As DBCommandWrapper = 
db.GetStoredProcCommandWrapper(sqlCommand)
With dbCommandWrapper
    .AddInParameter("@username", DbType.String, "Test")
End With
' DataSet that will hold the returned results		
Dim productsDataSet As DataSet = Nothing
productsDataSet = db.ExecuteDataSet(dbCommandWrapper)

please suggest....







Re: ODBC - Error

Postby Stephany Young » Sun, 26 Mar 2006 00:38:19 GMT

Well there is your problem.

The input parameter to the stored procedure is named @Parameter but you are 
adding a parameter called @username.








>> I am getting the followign error when using ODBC from ADO.NET.....
>>> System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL >>>> Server>>>> Driver][SQL Server]Procedure 'StoredProcedure' expects paramete>>
>> '@Parameter', which was not supplie>>
>>>
>> I installed latest MDAC , still i am getting erro>>..
>> any >>lp>>
>>
>> You're going to have to post your code and the parameter definition>>of 
>> your stored procedu>> in
>> order for us to troubleshoot this pro>>em>>
>>
>> This error has nothing to do with >>AC>>
>>>
>>
>>>>aul
>>>>~~~
>> Microsoft MVP (Visual B>>ic)
>> 



Re: ODBC - Error

Postby dnNy » Sun, 26 Mar 2006 00:48:02 GMT

oh ....no.thats just typo error..adding the correct parameter name .......










Re: ODBC - Error

Postby dnNy » Sun, 26 Mar 2006 00:56:04 GMT

the same code is working fine with SqlCommand , OleDBCommand its just failing 
with ODBCCommand.










Re: ODBC - Error

Postby Stephany Young » Sun, 26 Mar 2006 06:37:20 GMT

Where is the typo?

Are you saying that you typed the error message and the code fragment into 
your post and made a typo whilst doing so?

If so, how do you expect anyone to be able to help you with your 'problem'?

Copy and Paste is very good for avoiding typos.












>> >> I am getting the followign error when using ODBC from ADO.NET.....
>>>>>> System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL>>>>>>> Server>>>>>>> Driver][SQL Server]Procedure 'StoredProcedure' expects paramete>>
>> >> '@Parameter', which was not supplie>>
>>> >>>gt;>>> >> I installed latest MDAC , still i am getting erro>>.>>
>> >> any >>l>>
>> >> You're going to have to post your code and the parameter definit>>n>>
>> >> >>
>> >> your stored procedu>> >>
>> >> order for us to troubleshoot this pro>>e>>
>> >> This error has nothing to do with >>A>>
>> >>>>a>>
>> >>>>~>>
>> >> Microsoft MVP (Visual B>>i>>
>> >>>
>>>
>>
>> 



Re: ODBC - Error

Postby dnNy » Tue, 28 Mar 2006 08:08:12 GMT

k..here is the error ....
System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL
Server
Driver][SQL Server]Procedure 'dbo.tsp_Test' expects parameter
'@username', which was not supplied.

----------------------------------------------------
"Stephany Young" wrote:


Re: ODBC - Error

Postby Paul Clement » Wed, 29 Mar 2006 23:56:39 GMT



Thanks for your reply , i was saying its problem with MDAC because i was 
going through couple MSDN knowledge base issues and they suggested to install 
the MDAC latest srvice pack...
anyway here is my code.....
Dim db As Database = DatabaseFactory.CreateDatabase("Test")
Dim sqlCommand As String = "dbo.tsp_Test"
Dim dbCommandWrapper As DBCommandWrapper = 
db.GetStoredProcCommandWrapper(sqlCommand)
With dbCommandWrapper
    .AddInParameter("@username", DbType.String, "Test")
End With
' DataSet that will hold the returned results		
Dim productsDataSet As DataSet = Nothing
productsDataSet = db.ExecuteDataSet(dbCommandWrapper)


I've never used the Data Application Block, but the sample on the below page doesn't use the "@"
symbol to prefix parameter names.

 http://www.**--****.com/ 


Paul
~~~~
Microsoft MVP (Visual Basic)

Re: ODBC - Error

Postby dnNy » Thu, 30 Mar 2006 00:31:01 GMT

Thanks for the Info , in the parameter we can use "@" or without that also we 
can pass parameter names, internally MS Application Block checking for the 
"@" character.

After lot of struggle i got the solution , for ODBC Commands we need to pass 
the special Command text and not just the name of the procedure....
for ex: SP Name : tsp_Sample and if this accepsts two parameters then 
command text should be like this....

Without Return Val : CommandText = "{call tsp_Sample(?,?)}"  
With Return Val : CommandText = "{call  ?= tsp_Sample(?,?)}" 

and works fine...
Thanks again all for the support.







Similar Threads:

1.VS Studio 2005 beta 2 Error 1919, ODBC error 6

I have received this error after using the "clean system" utility on MSDN and 
following the specific and detailed uninstall instructions for previous 
versions.

Error log pasted:
[07/02/05,20:05:20] Microsoft Visual Studio 2005 Team Suite Edition Beta 
2-English: [2] ERROR:Error 1919.Error configuring ODBC data source: Xtreme 
Sample Database 2005, ODBC error 6: Component not found in the registry. 
Verify that the file Xtreme Sample Database 2005 exists and that you can 
access it.
[07/02/05,20:05:27] Microsoft Visual Studio 2005 Team Suite Edition Beta 
2-English: [2] ERROR:Error 1919.Error configuring ODBC data source: Xtreme 
Sample Database 2005, ODBC error 6: Component not found in the registry. 
Verify that the file Xtreme Sample Database 2005 exists and that you can 
access it.
[07/02/05,20:05:30] Microsoft Visual Studio 2005 Team Suite Edition Beta 
2-English: [2] ACTION FAILURE:Action ended 20:05:30: InstallFinalize. Return 
value 3.See MSI log for details.
[07/02/05,20:25:26] Microsoft Visual Studio 2005 Team Suite Edition Beta 
2-English: [2] ACTION FAILURE:Action ended 20:25:26: INSTALL. Return value 
3.See MSI log for details.
[07/02/05,20:28:43] setup.exe: [2] ISetupComponent::Pre/Post/Install() 
failed in ISetupManager::InstallManagerHelper() with HRESULT -2147023293.
[07/02/05,20:28:43] setup.exe: [2] Component error string not specified in 
ISetupManager::AddToActionResultCollection()
[07/02/05,20:29:32] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 
2005 Team Suite Edition Beta 2-English is not installed.
[07/02/05,20:29:32] VS70pgui: [2] Unknown component status for.NET Compact 
Framework 1.0 SP3
[07/02/05,20:29:33] VS70pgui: [2] Unknown component status for.NET Compact 
Framework 2.0
[07/02/05,20:29:33] VS70pgui: [2] Unknown component status forMicrosoft 
Visual Studio Tools for Office System 2005 Runtime Beta 2
[07/02/05,20:29:33] VS70pgui: [2] Unknown component status forMicrosoft 
Visual J# Redistributable Package 2.0 Beta 2
[07/02/05,20:29:33] VS70pgui: [2] Unknown component status forSQL Server 
2005 Mobile Edition
[07/02/05,20:29:34] VS70pgui: [2] Unknown component status forMicrosoft 
Device Emulator version 1.0 Beta 2

please help, R

-- 
Hey, where are we going?  And why are we in this handbasket?

2.ODBC error

I am working on my first ASP .Net page and I need access to data, however I 
am getting the error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data 
source name not found and no default driver specified

What would cause this?  Everything runs fine from VB .Net windows 
applications that I have built.  What do I need to do different in ASP?

Thanks for the information.

Brad 


3.Pervasive ODBC error in IIS 6.0

I receive the following error when trying to connect to a Pervasive
database through ODBC:

ERROR [08S01] [Pervasive][Pervasive ODBC Client Interface][Pervasive
ODBC Client Interface][Pervasive ODBC Client Interface LNA]No available

transport protocol for the Pervasive Network Services Layer.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't
support the version of ODBC behavior that the application requested
(see SQLSetEnvAttr).


The application is working fine on my development machine (windows XP
with IIS 5.0 and .NET framework 2) and doesn't work on my web server
(windows server 2003 web edition with IIS 6.0 and .NET framework 2)


Any ideas?

4.FormsAuthentication system dsn odbc error

I have an asp.net application which uses FormsAuthentication.
I have a reference to a vb6 dll (updateSage).
I pass to the updateSage.dll values to update a database and a
connection string.
The connection string is a System DSN.
The DSN is on the same machine as the ASP.Net application.
The Database the DSN connects to is on a different server.
I get an ODBC error when I try to update the database.

I have called the same dll using a vb.net application with no problem.

Does anyone know what could be wrong?

I thought it might be something to do with security not have
sufficiient permission to access the other server but if this is the
case how do I get round it.
Thanks
Michael

5.Error 1918 Error installing ODBC driver Microsoft Visual FoxPro:

I am Italian developer, escuse me for my bad English 
I have a problem with ODBC.
I must link to a database from Visual FoxPro, I have installed Windows XP 
Professional with service pack 2. When I try to install driver for Visual 
FoxPro i see the message:
rror 1918. Error installing ODBC driver: Microsoft Visual FoxPro Driver, 
ODBC error 13: : Impossibile caricare la libreria di impostazione o del 
convertitore. Verify that the file Microsoft Visual FoxPro Driver exists and 
that you can access it
Can some one help me?
Thank you for your attention

6. ODBC has error but no error message displayed

7. Error 1918 Error installing ODBC driver Microsoft Visual FoxPro:



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 59 guest