Hi
I am trying to extract data from an Oracle RDB database on an Alpha (seems not many / no-one is doing this - or if they are, they aren't putting samples etc up on the Net). I also come from a COBOL/VMS background (no laughing !) with 12 years experience of this and 4 days experience of ASP .NET.
Anyway, I have figured out how to connect to the database and execute a query - I know I should really use a stored procedure but haven't figured that pout yet.
How do I get the data from my query into a DataGrid etc ? I can do it if I set the query in the SQLDataSource and then Bind this to the DataGrid - but how to I do it via code and not use the SqlDataSource ? My code so far is below :
Dim
myConnection As String
If myConnection = "" Then
myConnection =
"Dsn=dsnName;server=servername;uid=username;pwd=password;tlo=0;dba=W;svr=svrName;cls=generic;database=attach 'filename l$iv_testdb';xpt=2=tcp/ip;cso=1"
End IfDim myConn As New Data.Odbc.OdbcConnection(myConnection)
Dim mySelectQuery As String = "SELECT stock, shortname from iv_stocks limit to 10 rows"Dim myOdbcCommand As New Data.Odbc.OdbcCommand(mySelectQuery)
myOdbcCommand.Connection = myConn
myConn.Open()
myOdbcCommand.ExecuteNonQuery()
myOdbcCommand.Connection.Close()
TIA
Rob