Custom OLEDB Provider
-
Here we have a Custom OLEDB provider. We have problems dealing with the null values. The OLEDB provider is in VC. Here we get the records as an variant array and then moving it to a stream object and then assigning it to a BSTR pointer. We are reading that as an ADO recordset from VB. All the values are ok in VB. But when we come across null values, we are not able to process it properly. When we write NULL to the stream object (which is bytes), we are reading it as 0 in the VB recordset.(since in vc NULL has a value 0). So i need to read that value as null in the VB. In VC i tried writing VT_NULL and VT_EMPTY. But i could not read that as null in VB. if i use the isnull(fieldname) , i need to get the result as true if the value is null. I dont know how the null value is treated internally. We use this OLEDB provider not only from VB, we use even from Crystal reports for reports. So can anybody please let me know how do it or let me know any source where i can get the help from.
-
Here we have a Custom OLEDB provider. We have problems dealing with the null values. The OLEDB provider is in VC. Here we get the records as an variant array and then moving it to a stream object and then assigning it to a BSTR pointer. We are reading that as an ADO recordset from VB. All the values are ok in VB. But when we come across null values, we are not able to process it properly. When we write NULL to the stream object (which is bytes), we are reading it as 0 in the VB recordset.(since in vc NULL has a value 0). So i need to read that value as null in the VB. In VC i tried writing VT_NULL and VT_EMPTY. But i could not read that as null in VB. if i use the isnull(fieldname) , i need to get the result as true if the value is null. I dont know how the null value is treated internally. We use this OLEDB provider not only from VB, we use even from Crystal reports for reports. So can anybody please let me know how do it or let me know any source where i can get the help from.
Hi, I have Q concerning ADO/OLEDB. I am writing an application which has to access MS-Access databases selected at runtime by the user thru a file open dialog, the format of the data bases is same but the databases may be located in different places. 1. Can I use ADO/OLEDB to open these DB's when a path is specified ( This capability like that of DAO, the path can be spec and opened ) 2. Or do i need the DSN and not specify the actual location so that the DSN will ask the user to locate the DB. (Actually here the application will use ODBC again when i want to use ADO) Since you are already working in OLEDB I hope you can help me in this context. Any suggestions or awnsers will be helpful.
-
Here we have a Custom OLEDB provider. We have problems dealing with the null values. The OLEDB provider is in VC. Here we get the records as an variant array and then moving it to a stream object and then assigning it to a BSTR pointer. We are reading that as an ADO recordset from VB. All the values are ok in VB. But when we come across null values, we are not able to process it properly. When we write NULL to the stream object (which is bytes), we are reading it as 0 in the VB recordset.(since in vc NULL has a value 0). So i need to read that value as null in the VB. In VC i tried writing VT_NULL and VT_EMPTY. But i could not read that as null in VB. if i use the isnull(fieldname) , i need to get the result as true if the value is null. I dont know how the null value is treated internally. We use this OLEDB provider not only from VB, we use even from Crystal reports for reports. So can anybody please let me know how do it or let me know any source where i can get the help from.