ftj
May 12th, 2005, 09:26 AM
I have a single SQL query in my ASP.NET application that accesses 2 different databases. I open the two connections and send the command over one of them.
Dim OleDbCommand1 = New OleDbCommand
Dim dtrAsset As OleDbDataReader
OleDbCommand1.Connection = OleDbConnection1
OleDbCommand1.CommandText = "SELECT fund_basic.fundname, price.price * share_basic.bookshares " & _
"FROM ftjweb!share_basic " & _
"INNER JOIN global!price ON substr(share_basic.basicfund,3,5) = price.ticker " & _
"INNER JOIN ftjweb!fund_basic ON price.ticker = fund_basic.symbol " & _
"INNER JOIN ftjweb!allocation ON price.ticker = allocation.ticker AND share_basic.basicacct = allocation.clientacct AND share_basic.basicsubacct = allocation.clientsuba " & _
"WHERE share_basic.basicacct = ? AND share_basic.basicsubacct = ? AND share_basic.basicfund <> 'DFSCASH' " & _
"AND share_basic.bookshares <> 0.0000 "
OleDbCommand1.Parameters.Add("@basicacct", account)
OleDbCommand1.Parameters.Add("@basicsubacct", subaccnt)
OleDbConnectGraph.Open()
OleDbConnection1.Open()
dtrAsset = OleDbCommand1.ExecuteReader()
dtrAsset.Close()
OleDbConnectGraph.Close()
OleDbConnection1.Close()
My connection strings are correct. This code WORKS FINE on my pc but on the server I get the following error:
Server Error in '/Charts' Application.
--------------------------------------------------------------------------------
Cannot open file c:\winnt\system32\global.dbc.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Cannot open file c:\winnt\system32\global.dbc.
--------------------------------------------------------------------------------
I dont understand why its looking for global.dbc in c:\winnt\system32 when it is located in the inetpub directory on the server as specified in the connection string.
Appreciate any help!
Thanks
Dim OleDbCommand1 = New OleDbCommand
Dim dtrAsset As OleDbDataReader
OleDbCommand1.Connection = OleDbConnection1
OleDbCommand1.CommandText = "SELECT fund_basic.fundname, price.price * share_basic.bookshares " & _
"FROM ftjweb!share_basic " & _
"INNER JOIN global!price ON substr(share_basic.basicfund,3,5) = price.ticker " & _
"INNER JOIN ftjweb!fund_basic ON price.ticker = fund_basic.symbol " & _
"INNER JOIN ftjweb!allocation ON price.ticker = allocation.ticker AND share_basic.basicacct = allocation.clientacct AND share_basic.basicsubacct = allocation.clientsuba " & _
"WHERE share_basic.basicacct = ? AND share_basic.basicsubacct = ? AND share_basic.basicfund <> 'DFSCASH' " & _
"AND share_basic.bookshares <> 0.0000 "
OleDbCommand1.Parameters.Add("@basicacct", account)
OleDbCommand1.Parameters.Add("@basicsubacct", subaccnt)
OleDbConnectGraph.Open()
OleDbConnection1.Open()
dtrAsset = OleDbCommand1.ExecuteReader()
dtrAsset.Close()
OleDbConnectGraph.Close()
OleDbConnection1.Close()
My connection strings are correct. This code WORKS FINE on my pc but on the server I get the following error:
Server Error in '/Charts' Application.
--------------------------------------------------------------------------------
Cannot open file c:\winnt\system32\global.dbc.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Cannot open file c:\winnt\system32\global.dbc.
--------------------------------------------------------------------------------
I dont understand why its looking for global.dbc in c:\winnt\system32 when it is located in the inetpub directory on the server as specified in the connection string.
Appreciate any help!
Thanks