Guest_imported
New member
- Jan 1, 1970
- 0
I'm having a problem getting default field values from an ADO recordset using Microsoft's ADO Provider. I'm 90% certain I saw this work at some point, but I just can't figure out how to get it to work now. Basically, what I would hope to see is that when I do a .AddNew on the ADO recordset, fields that have a default value would already be populated in the recordset. Here's a piece of code that I am using:
m_oConnection.ConnectionString = _
"Provider=MSDAORA.1;Password=PASSWORD;User ID=USER;Data Source=ALIAS"
m_oConnection.CursorLocation = adUseClient
m_oConnection.Open
Set m_oRS = New Recordset
m_oRS.ActiveConnection = m_oConnection
m_oRS.CursorType = adOpenDynamic
m_oRS.Source = "select * from TABLENAME"
m_oRS.Open
m_oRS.AddNew
================
At this point I would expect to see the database column defaults in the field, but do not. Any suggestions?
Thanks in advance,
Tom
m_oConnection.ConnectionString = _
"Provider=MSDAORA.1;Password=PASSWORD;User ID=USER;Data Source=ALIAS"
m_oConnection.CursorLocation = adUseClient
m_oConnection.Open
Set m_oRS = New Recordset
m_oRS.ActiveConnection = m_oConnection
m_oRS.CursorType = adOpenDynamic
m_oRS.Source = "select * from TABLENAME"
m_oRS.Open
m_oRS.AddNew
================
At this point I would expect to see the database column defaults in the field, but do not. Any suggestions?
Thanks in advance,
Tom