473,322 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Insert Proc to Sybase

I wrote a stored procedure to insert data on Sybase. I need to find code on
how to execute the stored procedure from C#.

Do you have any examples?
Dec 6 '07 #1
6 2265
Mel,

I don't know if Sybase has a managed provider which you can use. Do you
have ODBC or OLEDB drivers for the data source? If so, you would use the
classes in the System.Data.Odbc and System.Data.OleDb namespaces
respectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
>I wrote a stored procedure to insert data on Sybase. I need to find code
on
how to execute the stored procedure from C#.

Do you have any examples?

Dec 6 '07 #2
hi,

here the link to an exemple on how to do so (see section 'odbc')
http://msdn2.microsoft.com/en-us/lib...y8(VS.71).aspx

Hope it helps,
Martin

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.coma écrit
dans le message de news: el**************@TK2MSFTNGP03.phx.gbl...
Mel,

I don't know if Sybase has a managed provider which you can use. Do
you have ODBC or OLEDB drivers for the data source? If so, you would use
the classes in the System.Data.Odbc and System.Data.OleDb namespaces
respectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
>>I wrote a stored procedure to insert data on Sybase. I need to find code
on
how to execute the stored procedure from C#.

Do you have any examples?



Dec 6 '07 #3
What is the connection string for Sybase?

"news.microsoft.com" wrote:
hi,

here the link to an exemple on how to do so (see section 'odbc')
http://msdn2.microsoft.com/en-us/lib...y8(VS.71).aspx

Hope it helps,
Martin

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.coma écrit
dans le message de news: el**************@TK2MSFTNGP03.phx.gbl...
Mel,

I don't know if Sybase has a managed provider which you can use. Do
you have ODBC or OLEDB drivers for the data source? If so, you would use
the classes in the System.Data.Odbc and System.Data.OleDb namespaces
respectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
>I wrote a stored procedure to insert data on Sybase. I need to find code
on
how to execute the stored procedure from C#.

Do you have any examples?


Dec 6 '07 #4
Mel,

This should help:

http://www.connectionstrings.com/?carrier=sybase
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:24**********************************@microsof t.com...
What is the connection string for Sybase?

"news.microsoft.com" wrote:
>hi,

here the link to an exemple on how to do so (see section 'odbc')
http://msdn2.microsoft.com/en-us/lib...y8(VS.71).aspx

Hope it helps,
Martin

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.coma
écrit
dans le message de news: el**************@TK2MSFTNGP03.phx.gbl...
Mel,

I don't know if Sybase has a managed provider which you can use. Do
you have ODBC or OLEDB drivers for the data source? If so, you would
use
the classes in the System.Data.Odbc and System.Data.OleDb namespaces
respectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
I wrote a stored procedure to insert data on Sybase. I need to find
code
on
how to execute the stored procedure from C#.

Do you have any examples?



Dec 6 '07 #5
Hi,

Google it !

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Mel" <Me*@discussions.microsoft.comwrote in message
news:24**********************************@microsof t.com...
What is the connection string for Sybase?

"news.microsoft.com" wrote:
>hi,

here the link to an exemple on how to do so (see section 'odbc')
http://msdn2.microsoft.com/en-us/lib...y8(VS.71).aspx

Hope it helps,
Martin

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.coma
écrit
dans le message de news: el**************@TK2MSFTNGP03.phx.gbl...
Mel,

I don't know if Sybase has a managed provider which you can use. Do
you have ODBC or OLEDB drivers for the data source? If so, you would
use
the classes in the System.Data.Odbc and System.Data.OleDb namespaces
respectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mel" <Me*@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
I wrote a stored procedure to insert data on Sybase. I need to find
code
on
how to execute the stored procedure from C#.

Do you have any examples?



Dec 6 '07 #6
On Thu, 6 Dec 2007 08:44:00 -0800, Mel <Me*@discussions.microsoft.com>
wrote:
>I wrote a stored procedure to insert data on Sybase. I need to find code on
how to execute the stored procedure from C#.

Do you have any examples?
Hi, Using SQLAnywhere?
Provider=ASAProv;Data Source=MyDSN;Persist Security
Info=True;Password=password;User ID=user;Initial Catalog=myDatabase

If using SqlAnywhere 9.0 be careful,
found a interesting bug that may be in the drivers somewhere.

I got unusual data corruptions using the
System.Data.OleDb.OleDbFactory with parameters to write to a
SQLAnywhere 9.0 database.
Cast the parameter directly to an oleDBParameter before setting its
value and problem disappeared.
I reported to Microsoft but it was further downstream than they wanted
to paddle so they washed their hands of it.

I also ended up with intermittant exceptions that occured every 3- 4
days on clients site.
After weeks of refactoring and optimising I finally followed my guts
and ported the DAL and database to SQLServer.
No more problems.
Don't get me wrong, we use SQLAnywhere as a backend for a number of
our commercial apps.
But SQLAnywhere 9.00 and C# framework 2.00 well ...

Bob
Dec 7 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: stefy | last post by:
I'd like insert null value from a query but i can do it, if my query is : UPDATE table:name UPDATE euro='' WHERE id='5'; i have a sybase message warning like this : Error converting data type...
2
by: Tobes \(Breath\) | last post by:
Hi there, I have some text files saved using a UTF-8 encoding. The "BULK INSERT" statment in Sql Server 2000 is failing with a column length error. Saving the file as ASCII removes the problem....
1
by: Dianna | last post by:
I have a datafeed coming from another Database which I am populating into a Dataset. I want to take the dataset and insert all the rows into a Sql Table. So far I have an 'insert stored proc' and...
11
by: ColdCanuck | last post by:
Greetings! I am VERY new to DB2 but not Orable, Sybase and SQL Server. I am trying to call a stored procedure via VB 6 and ADO/OLEDB. But when I try to execute
5
by: dotyet | last post by:
I have been given the daunting task of sql query tuning. I am looking for ways to get started with that. I am on DB2 UDB 8.2 (8.1 with Fixpak 8) on Windows. One point which I could think about...
20
by: John Bailo | last post by:
I have a c# program that loops through a table on a DB2 database. On each iteration it assigns data to values in the SqlParameter collection. The command text is an INSERT statement to a Sql...
3
by: Ultrak The DBA | last post by:
As a converted sybase dba, I have a question. In sybase a command can be executed multiple times by placing a go 1000 at the end of the statement. Such as: insert into a (col1, col2)...
4
by: ryushinyama | last post by:
I had to do a lot of searching to get this one to work and in doing so I saw a lot of different sites where people were looking for this answer so I thought I would put it up. If you are trying...
1
by: bdbeames | last post by:
Well this is for Sybase, running on server 2003, but this seemed the most relevant place to post I have a .txt file with data I would like to insert into a Sybase table. I'm new to Sybase, as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.