|
Check here
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
Hi,
I'm trying to get/set datetime field of exchange item (in resolution of Milliseconds) - using ADO.RecordClass.
However it seemed that after I call Record.Update (in set case) the datetime value is rounded in seconds resolution.
(i.e. trying to set 19:00:00.111 --> result with 19:00:01.000)
Please note - I'm using C# language to do so.
Can anyone help me to overcome this problem?
10x,
Zachi
|
|
|
|
|
I always use TimeSpan or DateTime as they have access to millisecond, please explain a little bit more why you are using ADO.RecordClass
Thanks
Al
|
|
|
|
|
Hi,
First, Thanks for your reply.
Here is the thing - I'm using ADO (as interop in c# project) to access exchange storage items.
When I tried to access record field of type 'datetime.tz' (using Record.Fields[<fieldname>].Value) either for reading or for writing - it seemed that ADO round DateTime fields with resolution of seconds (i.e. instead of getting '12:00:00.123' --> I'm getting '12:00:01').
Also, I'm using Exchange-Explorer tool to read/modify 'datetime.tz' field it succeed to do so (with resolution of milliseconds).
It is strange - but I checked retrieval using OLE-DB (not ADO) and it succeed to bring resolution of milliseconds (as should).
I will be more than grateful if you can help me with this one.
10x,
Zachi
|
|
|
|
|
I am using ADO classes but when I'm compiling my file im having linking errors that are:
--------------------Configuration: file_name - Win32 Debug--------------------
Compiling...
file_name.cpp
Linking...
file_name.obj : error LNK2001: unresolved external symbol "public: int __thiscall CADODatabase::Execute(char const *)" (?Execute@CADODatabase@@QAEHPBD@Z)
file_name.obj : error LNK2001: unresolved external symbol "public: int __thiscall CADODatabase::Open(char const *,char const *,char const *)" (?Open@CADODatabase@@QAEHPBD00@Z)
file_name.obj : error LNK2001: unresolved external symbol "public: void __thiscall CADODatabase::Close(void)" (?Close@CADODatabase@@QAEXXZ)
Debug/file_name.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
file_name.exe - 4 error(s), 0 warning(s)
I can't figure out what's the problem
Can you help me?
Thanks guys
Zvanolli
|
|
|
|
|
It seems that you must add to the project the files or the library where CADODatabase is defined.
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi,
I am writing a window desktop application which only
allow single user. Then is it necessary to have transaction
management for the data writing to the relational database ?
The data writing operation includes several steps (ie. if
the window hangs, then the operation may be corrupted).
Thanks
|
|
|
|
|
sure necessary especially if your writing operation has several steps.
think about if you get an error while inserting or deleting a record related to several tables. there would sure remain some unnecessary data in tables. (records that have been deleted or inserted before getting the error.)
|
|
|
|
|
Thanks for your reply.
But my program is not for enterprise application,
just for desktop single user. Is this still necessary coz
the addition of transaction into my program will cause a lot of effort ?
So are application like MSWord,...also adopts transactions ?
|
|
|
|
|
its up to you but if i were you i would use transaction. (depending uopn your words about the writing process)
anonymous wrote:
So are application like MSWord,...also adopts transactions ?
can you be more clear?
|
|
|
|
|
MSWord is not a database, so it neither supports not needs transactions. If you are making multiple related changes to multiple taples (for example: insert new row in main table, insert new row(s) in detail table using foreign key from new row in main table) you should always enclose these in a single transaction, so that if one of the dependant changes fails (an unexpected null value, an out of range value, etc. ) you can easily cancel the preceding changes (rollback the transaction). Adding the transaction support is relatively easy, and should not take much code,
Transactions really have nothing to do specifically with multi-user scenarios, instead the have to do with keeping changes consistent - preventing partial updates that could corrupt the data.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
When creating table in access, the default item is not null.
How to create item which could be null?
Thanks!
|
|
|
|
|
Open the table in design view. Select the field in which you wish to allow nulls
set the "Required" entry to "no". If the field is a text or memo type, you may also want to set "allow zero length" to yes (this allows an empty string as a value, not the same as a null).
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
hii all,
Am working with sql server 2000,i have a series problem my database log file is expanding in unusual way; my data file(MDF) just 50MB but my log is 2 GB can u imagine that. i know i can restrict size but why its expanding like this?
marcoryos
|
|
|
|
|
Wow 2 GB is quite a lot, make sure there are no errors, you can avoid using the LOG but changing to Simple. Thought to let you know!
Al
|
|
|
|
|
What is the recovery model set to? Unless it is 'simple', the log file will not be automatically truncated, but will continue to grow until you truncate it either by issuing a 'backup log with truncate only' or by making a full backup and truncating the log as part of the backup command. Otherwise all changes are saved for possible use in restoring the database changes since the last backup. The 'simple' recovery model says you are only going to depend on backups and won't use logs for restore, so the log will be truncated as soon as changes are commited.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
Hi Folks,
Using
MS-SQL Server 2000
Windows XP Pro
VB 6
I need to find the actual data size for a nvarch, datefields, money etc.. using a SQL Statement. When I use the 'sp_column' command in SQL Server it doesn't tell me the actual field length that has been defined for the Table. Does anyone have a SQL Statement that can give me the correct field size. If you look at the table definition is Enterprise Manager it shows me the correct values. Just need to replicate this info into a sql statement.
Cheers,
Narly..
Narly
|
|
|
|
|
sp_help returns the correct length for columns (in the 2nd recordset returned). You could extract the code that generates the second recordset and create your own sproc...
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
Thanks Eric. I'll give it a try.
|
|
|
|
|
|
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
I want to know if you can call a store procedure in a datepart function. I am trying to pass the datepart dates that are created by a stored procedure. I am not sure that this is even possible. My main goal is to count work days between two given dates. I thought I could use the datepart function to count the 6th and 7th day. Than I could subtract their totals from the final count. The code I am trying is below.
select datepart(weekday, dbo.sp_work_day_count '45')
Scott Moore
Developer
|
|
|
|
|
Hi, I currently faced a problem on inserting decimal value from vb .net into SQLCE which declared as money data type. ANyone know how to solve this??
Thanks in advance!
|
|
|
|
|
How can I use DTS to migrate some tables and views from SQL server to a new access database?
I want to be able to do this programmatically, so that the windows application user can create an access database from an existing SQL server.
Thanks,
Martin
|
|
|
|
|
Search for "creating package dts" or see the samples in SQL Server manual. Or google for it. I found this[^] and this.[^]. Is this help?
<italic>Work hard, Work effectively.
|
|
|
|