unhandled system error when i call this function

dotolee

Member
Joined
Nov 30, 2004
Messages
20
Programming Experience
10+
Can you explain why I'm geting the following error message:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
It occurs when i try to fill the adapter........


PublicFunction GetWorkEffortRatios() AsBoolean


gstrSQL = "Select W.WorkEffortRequired, R.TypeName From ResourceType R LEFT JOIN WorkEffortRatios W where R.TypeID = W.ResourceTypeID"


If Connect(PET) Then



goDataAdapter =​
New OleDbDataAdapter(gstrSQL, gConn)


goDataSet =
New DataSet("WERatio")

goDataAdapter.Fill(goDataSet, "WorkEfforts")

DisConnect()

GetWorkEffortRatios =
True


Else




GetWorkEffortRatios =​
False



EndIf



EndFunction


 
It could be the syntax of your SQL statement. Try:
VB.NET:
[size=2]SELECT W.WorkEffortRequired, R.TypeName FROM ResourceType R LEFT JOIN WorkEffortRatios W [u][b]ON[/b][/u] R.TypeID = W.ResourceTypeID[/size]
 
Back
Top