Dataset con Oracle

giovedì 03 ottobre 2013 - 09.27
Tag Elenco Tags  VB.NET  |  .NET 3.0  |  .NET 3.5  |  .NET 4.0  |  Windows Server 2003  |  Windows 7  |  Visual Studio 2010  |  Oracle 11g

clan Profilo | Junior Member

salve
sto trovando difficoltà con database ORACLE 11g a creare un dataset/datatable per popolare una datagridview con VB in Vs2008
Qualcuno può darmi una dritta
Grazie

0v3rCl0ck Profilo | Guru

dovresti allegare la parte di codice che ti da problemi. L'accesso a Oracle è del tutto simile ad un accesso Sql, e i client .net seguono le stesse linee guida, e per riempire un dataset il codice dovrebbe essere simile al seguente:

var connString = "xxx"; using (var connection = new OracleConnection(connString)) { var cmdText = "select * from mytable"; using (var command = new OracleCommand(cmdText, connection)) { using (var adapter = new OracleDataAdapter(command)) { var myDataset = new DataSet(); connection.Open(); adapter.Fill(myDataset); connection.Close(); } } }

ciao
-------------------------------------------------------
Michael Denny
Lead Software Developer & Solutions Architect
http://blogs.dotnethell.it/Regulator/
http://dennymichael.wordpress.com
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5