Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello. I have query out a data in sql and display in data gridview.
from data gridview there how I'm going to query out the data inside the oracle db?
I"m using vb.net
Posted
Comments
woopsydoozy 31-Jul-13 9:24am    
what are you asking? How to get data from an Oracle DB, or how to bind your data to a gridView?
gogole_yuna 31-Jul-13 21:16pm    
yes i want to get data from oracle by using the data in data gridview as a reference.
woopsydoozy 1-Aug-13 12:00pm    
OK, so you already have a gridview loaded with data--did that data not come from Oracle? Where are you stuck? What code do you have so far?
gogole_yuna 1-Aug-13 23:25pm    
ya2. thats right. i dont know how to call in oracle. This is my code for oracle. i dont how to call the loaded gridview

Dim connectionString As String = "Data Source = ***; User ID = ***; Password = ***;"
Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString)

'Dim queryString As String = "select * abc where device = gridview"

Dim sqlCommand As OracleClient.OracleCommand = New OracleClient.OracleCommand(queryString, sqlConnection)
sqlCommand.CommandTimeout = 0

Dim dataAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(sqlCommand)
Dim dataSet As DataSet = New DataSet
dataAdapter.Fill(dataSet)

Return dataSet
gogole_yuna 2-Aug-13 0:45am    
@woopsydoozy : the data that previously is from SQL

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900