cancel
Showing results for 
Search instead for 
Did you mean: 

64 BIT Sybase.ADONet4.ASEClient.dll dont support unnamed parameters

Former Member
0 Kudos

We are migrating from  32 bit  asp.net website to 64 bit asp.net website. 

we have number of stored procedure calls  calling Sybase.Data.AseClient.dll in  "EXEC sp_test ?   " format from our database  layer.

with the new 64 bit DLL  Sybase.ADONet4.ASEClient.dll   the above SP call format is throwing an exception  Incorrect syntax near '?'.

following is the stack trace

   at Sybase.Data.AseClient1.AseCommand.CheckResult(Int32 res)

   at Sybase.Data.AseClient1.AseCommand.Execute(CommandBehavior commandBehavior)

   at Sybase.Data.AseClient1.AseCommand._ExecuteReader(CommandBehavior commandBehavior)

   at Sybase.Data.AseClient1.AseCommand.ExecuteReader(CommandBehavior commandBehavior)

   at Sybase.Data.AseClient.AseCommand.ExecuteDbDataReader(CommandBehavior behavior)

   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)

please suggest me the work around for this....

Regards,

Ram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I downloaded  and added Sybase.AdoNet4.AseClient product version 40157.1300.0.

I am getting the following error on session start only. we load the  sybase driver and call sybase to load some application specific data in application memory. It wont appear in subsequent requests. If the application is not used for some time  the error appears again.  Please provide the solution for this issue.

Sybase.AdoNet4.AseClient: The type initializer for 'Sybase.Data.AseClient1.AseConnection' threw an exception.: at Sybase.Data.AseClient1.AseConnection..ctor(AseConnection realConnection, String connectionString) at Sybase.Data.AseClient.AseConnection..ctor(String connectionString)

Former Member
0 Kudos

Hi Ram,

Please check the working directory and make sure there isn't a file, sybdrvado20.dll in there with lower version than the 4.157.1300.0.  If problem persists we'll need more details to understand how you are receiving this message.

Have you resolved the named parameter issue?  I just test 15.7 SP133 version and named parameters are sent to ASE.


Cheers,

-Paul

Former Member
0 Kudos

Hi Paul,

I resolved named parameters issue by altering the  sqltext (removing '?') and setting command type as stored procedure.

Session start issue:

Sybase.AdoNet4.AseClient.dll is the only sybase dll in working directory. I cant myself find more about it except the stack trace posted above.

Sybase.AdoNet4.AseClient: The type initializer for 'Sybase.Data.AseClient1.AseConnection' threw an exception.: at Sybase.Data.AseClient1.AseConnection..ctor(AseConnection realConnection, String connectionString) at Sybase.Data.AseClient.AseConnection..ctor(String connectionString)

This  issue is only happening in Windows 2012 Server IIS 8.0. (not happening when run in visual studio )

please help#

Regards,

Ram

Former Member
0 Kudos

Hi Ram,

Please post the code portion and include connection string. You are going from very old Provider to a very current one and possibly running into some issues with either parsing in the Provider or maybe something changed in how we should process this command.

Anyway, let's see what the code looks like.

Dawn mentioned the "Trial edition" - this isn't trial - this is free SDK.

Go to the link https://store.sap.com/sap/cpa/ui/resources/store/html/StoreFront.html

On bottom - Database and Technology

In search field enter "SAP SDK for Adaptive Server Enterprise"


The top two offerings are 15.7 SP127 and 15.7 SP130 (sorry they aren't labeled nicely).

Select SP130.  Click Free Trial button (this label is a misnomer - this isn't a trial - it is the actual software) Fill in the form and then email will be sent with link to the actual download page - select windows 64 bit platform.

I need to see your code before I tell you what you might be able to do in order for it to work. The implication here is you're going to bind a parameter to the command.  Typically with stored procedures in ADO.NET we see a lot more of the folks setting command type to stored procedure and then binding the parameters by name one after the other.

In your case looks like newer provider is sending the command literally (ADO.NET doesn't do prepared statements like ODBC Driver can).  Maybe with code some changes can be made to get it to work.  Or if parsing issue, maybe newer Provider resolves.

dawn_kim
Contributor
0 Kudos

Hi Ram,

I remember there being some issues with parameters and ado.net. The first thing I suggest is upgrading to the current version of the ado.net driver 15.7.0.1300 from SDK for SAP ASE 15.7 SP130 or SDK for SAP ASE 16.0 SP00 PL04.

The bugs dealt specifically with these issues passing nulls for specific datatypes and/or if the datatype on the ASE is a user identified type.

Another thing to look at is if you have NamedParameters in the connection string? By default this is set to true. So add this and  set it to false.

ref:  SyBooks Online AseConnecton constructors for ado.net provider.

Thanks,
Dawn Kim


Former Member
0 Kudos

please point me to link where i can download 15.7 ado.net driver. I appreciate your help.

dawn_kim
Contributor
0 Kudos

Hi Ram,

There is a trial version of the SDK I think they got SDK 15.7 SP127 up on the site currently. This will work to ASE 16.x and ASE 15.7

Go here: http://scn.sap.com/community/downloads

There is an article titled "The SCN Download Center is Now on the SAP Store: What's New?"

In this article there is a link to the SAP store click it

Than do a search for "SAP SDK for Adaptive Server Enterprise"

Click the free trial and it will ask for your information and send you an email.

 

From the link you get you should see a list of the SDKs.

I think this will help you for now.

Thanks,
Dawn Kim

dawn_kim
Contributor
0 Kudos

Hi Ram,

If you want to get from the download site:

You can find the downloads at SAP service market place.

SAP Service Marketplace - Home

Click SAP Support Portal (middle of the screen)

Click Software Downloads (grey top menu bar)

Click Support Packages and Patches (middle of the screen under A-Z index)

Select 'S'

Select 'SDK for SAP ASE'

You can pick the 15.7 or 16.0 version.

Click Support Packages and Patches on the right side of the screen.

(This will give you current versions of the patches)

(The patches are complete install patches)

This is the location for the latest downloads.

Older downloads can be found in 'SY Software Developer Kit'

If you want to look at the Windows versions of the drivers included in the SDK and the EBFs numbers go to this wiki link: Software Developer Kit for ASE driver versions for Windows - Wiki - SCN Wiki

Thanks,
Dawn Kim

Former Member
0 Kudos

Click Support Packages and Patches on the right side of the screen.


Its asking for Login and password after above step which I dont have.  how can I get the user id and password.

Former Member
0 Kudos

Hi Ram,
I don't know if you have been able to get a login so you can download the SDK.
This link will take you to a page where you can generate a login


http://www.sap.com/services-support/support.html

Go down to the lower left hand corner and request an S-User ID.

Kevin