Last post Feb 23, 2011 07:29 PM by Lannie
Feb 23, 2011 01:16 PM|Nighthawk0712|LINK
Is there anything special to do with Windows 2008 R2 Server and Visual Studio 2010 to get Oracle quereis to work? I have the same DB Connnection
string I have used before and it works. I am at a loss here.
Feb 23, 2011 01:38 PM|sansan|LINK
What do you mean by not working? Any errors?
Make sure that you have the correct datasource in TNS file on the new server.
Feb 23, 2011 01:41 PM|Shuvo Aymon|LINK
Please share the error message you got.
Feb 23, 2011 01:47 PM|Nighthawk0712|LINK
I should have put that I am not getting any errors at all. I do a search that is supposed to retrieve data back and it is not. It pulls up the data from the MS SQL Database with no issues.
Feb 23, 2011 02:57 PM|Lannie|LINK
Then post your Oracle query to have members help you look for problems
Feb 23, 2011 03:08 PM|Nighthawk0712|LINK
Here is my query and connection string:
Dim strConn As String = "Provider=MSDAORA.1;user id=xxx;password=xxx;data source=pnls_prod"
Dim sql As String = "select inmate.last_name,inmate.first_name,inmate.housing_location from inmate where inmate.jms_number = '" & DocketNumberTxt.Text & " '"
Dim Conn As New OleDbConnection(strConn)
Dim ObjDr As OleDbDataReader
Dim CMD As New OleDbCommand(sql, Conn)
ObjDr = CMD.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
HousingLocationTxt.Text = ObjDr("housing_location").ToString()
LastNameTxt.Text = ObjDr("last_name").ToString
FirstNameTxt.Text = ObjDr("first_name").ToString
When I excute the query, I get a name and a housing location return. I am not getting this on the server versus my box. I have the ODBC Connection in my DSN for the PNLS_PROD. I have installed Oracle Client 11g on the server and even tried Server. This
exact query works on another project I have on a 2003 Server same install. I hope this helps in my explanation. Sorry for the lack of information.
Feb 23, 2011 07:29 PM|Lannie|LINK
you method of passing a parameter to the SQL where clause does not look like anything I have seen for Oracle OLEDB in the past, manual reference follows.