Conversion from type 'DBNull' to type 'String' is not valid. (Oracle10gR2)


Author
Message
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

when retrieving data from Oracle database a VARCHAR2 field being NULL gives an expections. When there is text in the field then the select works ok.

What might be the problem here and how can it be solved?

TIA,

Kari

ps. I did find some other post related to null values put not quite like this. Also, when can we expect the next release with the DevExpress wrapper among other enhancements :-)

Picture attached

Attachments
nullexception.gif (217 views, 14.00 KB)
Replies
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi Ben,

thanks, that worked fine.

Kari

ps. Is there hope that we would have the next release available still this weekend?

Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

one additional problem: when I try to update the WWW-field I get "ORA-00936 Missing Expression" error.

So this is an Oracle error saying - I guess - that there is a problem with the update SQL-statement. What might go wrong here and is there a way to see the update statement SF is sending to the database.

Thanks again,

Kari

The error window "An error occured while saving an the data to the server"
================

BusinessLayerException
 An error occurred while saving an the data to the server.
DataLayerSavingException
 ORA-00936: missing expression

OracleException
 ORA-00936: missing expression


Source     : MicroFour StrataFrame Business

Stack Trace:
   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
   at MicroFour.StrataFrame.Data.OracleDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)
   at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)
   at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
   at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
   at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
We updated the debug mode in the version that I'm building to allow for the debugging of INSERT, UPDATE, and DELETE commands.  Before this version, the debug mode on the DbDataSourceItem class only showed SELECT commands.  So, once we get the new build to you, you can call SetDebugOn() on the DbDataSourceItem and you'll be able to see the command that is being sent to the database, and that will give us a clue.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The next release will be out before I leave the office today (4 hours or so to go) Smile
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

what might be the problem here: with the new relaese I still get the same ORA-00936 error mentioned in my previous post. Setting the debug on only shows the select statement - still the error appears when trying to save the changes.

Currently I'm testing this with the simplest possible query - just a couple of columns in the table. With SF samples everything is ok. Might the problem be with the SQL and Oracle? Unfortunately I didn't manage to find the right place to debug the application so that I could see the UPDATE statement.

Any ideas how to resolve this...?

Thank you for all your help,
Kari

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Well, Kari, I'm not sure why the debug isn't working, but I'm building you a maintenance release right now that has some additional debugging information.  You can install this one and just leave it installed, don't worry about going back to the pre-release.

Once you get it installed, it should give you more information in the debug file.  Also, if you can get the version of Oracle that you're running, the table structure (screenshot or CREATE TABLE script would be fine), and the .Designer.vb file for the business object and post those with the output from the debug file, it will go a long way towards helping me to reproduce the error. 

Let me know Smile Thanks

P.S.  I'll post the maintenance install here in a second.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Kari Paukku - 19 Years Ago
StrataFrame Team - 19 Years Ago
Kari Paukku - 19 Years Ago
Kari Paukku - 19 Years Ago
StrataFrame Team - 19 Years Ago
                         The next release will be out before I leave the office today (4 hours...
StrataFrame Team - 19 Years Ago
                             Hi, what might be the problem here: with the new relaese I still get...
Kari Paukku - 19 Years Ago
                                 Well, Kari, I'm not sure why the debug isn't working, but I'm building...
StrataFrame Team - 19 Years Ago
StrataFrame Team - 19 Years Ago
Kari Paukku - 19 Years Ago
StrataFrame Team - 19 Years Ago
Kari Paukku - 19 Years Ago
                         Kari, I am answering this from the floor of Tech-Ed and we will be...
Trent L. Taylor - 19 Years Ago
Kari Paukku - 19 Years Ago
StrataFrame Team - 19 Years Ago
Kari Paukku - 19 Years Ago
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search