[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Soren Forsdahl

3/27/2002 11:03:00 AM

Hey.
I just started to learn about odbc with vb .net.
I use also Sybase SQL Anywhere 6 i my work.
But we use clarion to code in, but we shall move to
vb .net.
But we have to use Sybase SQL Anywhere 6 databas.
Have any some sample that i can get to se how it would be??

Greetz Soren Forsdahl
Analys Consult KB
Sweden
2 Answers

Jonathan Hjertström

3/28/2002 10:33:00 AM

0

I use Microsoft.Data.Odbc and it actually works in Asp.Net. It is a shame
though that you need to manually code. Hope they will release next version
of VS.Net soon:-)

Here is my code. I have made references and I also use this line (in the top
of my codebehind page) to import it
Imports Microsoft.Data.Odbc

I have a Datagrid on my aspx page with the ID: DataGrid1

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim con As OdbcConnection

con = New OdbcConnection("DSN=MyDSN;UID=dba;PWD=sql;DatabaseFile=C:\Program
Files\Sybase\SQL Anywhere
7\asademo.db;AutoStop=YES;Integrated=NO;Debug=NO;DisableMultiRowFetch=NO")

Dim cmd As OdbcDataAdapter = New OdbcDataAdapter("select * from customer",
con)

Dim ds As New DataSet()

cmd.Fill(ds, "customer")

DataGrid1.DataSource = ds.Tables("customer")

DataBind()

End Sub

Regards,
Jonathan Hjertström

"Soren Forsdahl" <soren.forsdahl@ac-system.se> wrote in message
news:1b3f01c1d576$b344eae0$39ef2ecf@TKMSFTNGXA08...
> Hey.
> I just started to learn about odbc with vb .net.
> I use also Sybase SQL Anywhere 6 i my work.
> But we use clarion to code in, but we shall move to
> vb .net.
> But we have to use Sybase SQL Anywhere 6 databas.
> Have any some sample that i can get to se how it would be??
>
> Greetz Soren Forsdahl
> Analys Consult KB
> Sweden


=?iso-8859-1?Q?S=F6ren_Forsdahl?=

4/3/2002 3:40:00 PM

0

Sounds good.. Shall try it, but dont you have a source vid
a simple winform that I can get to look at?
It´s better for me.

Greetz Soren Forsdahl
Analys Consult KB
Sweden



>-----Original Message-----
>I use Microsoft.Data.Odbc and it actually works in
Asp.Net. It is a shame
>though that you need to manually code. Hope they will
release next version
>of VS.Net soon:-)
>
>Here is my code. I have made references and I also use
this line (in the top
>of my codebehind page) to import it
>Imports Microsoft.Data.Odbc
>
>I have a Datagrid on my aspx page with the ID: DataGrid1
>
>Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
>System.EventArgs) Handles MyBase.Load
>
>Dim con As OdbcConnection
>
>con = New OdbcConnection
("DSN=MyDSN;UID=dba;PWD=sql;DatabaseFile=C:\Program
>Files\Sybase\SQL Anywhere
>7
\asademo.db;AutoStop=YES;Integrated=NO;Debug=NO;DisableMult
iRowFetch=NO")
>
>Dim cmd As OdbcDataAdapter = New OdbcDataAdapter("select
* from customer",
>con)
>
>Dim ds As New DataSet()
>
>cmd.Fill(ds, "customer")
>
>DataGrid1.DataSource = ds.Tables("customer")
>
>DataBind()
>
>End Sub
>
>Regards,
>Jonathan Hjertström
>
>"Soren Forsdahl" <soren.forsdahl@ac-system.se> wrote in
message
>news:1b3f01c1d576$b344eae0$39ef2ecf@TKMSFTNGXA08...
>> Hey.
>> I just started to learn about odbc with vb .net.
>> I use also Sybase SQL Anywhere 6 i my work.
>> But we use clarion to code in, but we shall move to
>> vb .net.
>> But we have to use Sybase SQL Anywhere 6 databas.
>> Have any some sample that i can get to se how it would
be??
>>
>> Greetz Soren Forsdahl
>> Analys Consult KB
>> Sweden
>
>
>.
>