Question on ActiveX Updates

Question on ActiveX Updates

 

  

Hello



I have a question in regards to passing NULL values through a ActiveX Update
script. The reason behind using ActiveX is that this is the only way I can
push updates of SalesLogix data to our Remote Users.



When I come across a NULL field that will be placed in a Datetime, the
ActiveX bombs out. An easy enough solution is to just set those NULL values
to 0 which defaults to a date of '1900-01-01'.



The users aren't too thrilled with seeing that date. They would prefer that
it show up as a NULL. Is there any way to produce this through ActiveX?
Here is the code that is just used for the update:



dim rsSource, rsTarget

dim sSQL



set rsSource = CreateObject("ADODB.RecordSet")

set rsTarget = CreateObject("ADODB.RecordSet")



rsSource.ActiveConnection = oConn

rsTarget.ActiveConnection = oConn



rsTarget.CursorLocation = adUseClient

rsTarget.CursorType = adOpenStatic

rsTarget.LockType = adLockOptimistic



sSQL = "select APSAType,APSADate, ACCOUNTID FROM
sysdba.SalesLogixLoad, sysdba.FHLB_ACCOUNTEXT where MemberNumber = MEMBERNUM
"



rsSource.Open sSQL



while not rsSource.EOF



' agreement fields. Grab contact record for
update

sSQL = "select * from sysdba.FHLB_AGREEMENT
where ACCOUNTID = '" & rsSource.Fields("ACCOUNTID") & "'"

rsTarget.open sSQL



with rsTarget

.fields("APSAType").Value =
rsSource.Fields("APSAType") & ""

.fields("APSADate").Value =
rsSource.Fields("APSADate") & ""

.update

.close

end with





rsSource.MoveNext



Nathaniel Roberson

Database Administrator

Federal Home Loan Bank of Des Moines

800.544.3452, ext. 1067 or 515.281.1067

Fax 515.699.1235

[Email address protected]

www.fhlbdm.com






This message and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please delete the email and any files transmitted with it entirely from your computer.


MS Sql Server LazyDBA home page