|
Thanks for the info, Richard.
I've forwarded this to my colleague.
Cheers,
Simon
"VB.NET ... the STD of choice", me, internal company memo
|
|
|
|
|
Hello All,
Any recommendation for .NET database programming books? I need books that will really speak to me - I have the unlucky project to write Managed Providers. The books must be written in C# (do not like books written in two languages like C# and VB.NET - do not have the time).
Most of the stuff at Amazon.com seems to be VB.NET books - doing close to zero VB.NET currently.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
hi,
since u need the core internals of .net too, try
"c# and .net framework -- c++ perspective"
that should best fit your requirement.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Just gone to check it. It is rating very low at Amazon.com. The table of contents does not seems to carry anything new. I have 8 books on .NET so far, with 4 on C# - none deals with the internals, anyway.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Please could someone help me?
I have a SQL command which retrieves records no problem.
I can do wildcard searches with every field except my date field. What am I doing wrong?
Can someone give me some ideas or sample code.
Thankyou very much!
|
|
|
|
|
internally, a date is represented as an integer of some sort. dates are converted to string representations at the last possible moment. This is why you can do arithmetic with dates:-
select DateField1 + DateField2 from table
and you can use inequalities as conditional clauses too:-
select * from table where date1 < date2
Anyway, if you want to do some kind of wildcard matching, on strings, then you need to dynamically convert the date to a string:-
select * from table
where convert(varchar(25),datefield) like '%-10-%'
That should help you out. I am a bit worried though. The like clause, and use of wildcards, is a surefire way to kiss goodbye to performance. Particularly when you mention that you use wildcards on every field.
If you are trying to implement keyword searching on the data in your table, i'd suggest you look up full text indexing.
Signature space for rent. Apply by email to....
|
|
|
|
|
|
I have a feild of a SQL2000 DB set up as datetime, and I am trying to place a date into it as '11/4/2003'. The record gets inserted ok, but the date comes out as '1/1/1900'
Anyone care to gander as why?
|
|
|
|
|
I suppose your dateformat on the SQL server isnt 'd/m/yy' so it recognized it as 'something' but cant make a valid date out of it. So it gets inserted as 'empty' date which resolves to 1/1/1900.
I keep submitting “VB” as a Priority-1 bug, but apparently no one here knows how to fix it. Nick Hodapp, Semicolon
|
|
|
|
|
Tip:- to save confusion when using dates in MSSQLServer, always use the format like this:-
YYYY-MM-DD HH:MM:SS
eg
'2002-11-05'
or
'2002-11-05 16:35:00'
this really helps to eliminate date ordering oddness.
Signature space for rent. Apply by email to....
|
|
|
|
|
I close a database using:
database.OpenEx(mySql,CDatabase::noOdbcDialog) ...
...more code...
database.Close();
but it remains existing. I have read it is also needed to destroy the object,, how can I do it?
Thanks.
|
|
|
|
|
Set database = Nothing (in straight asp)
|
|
|
|
|
Well, it is an MFC app, this way:
void OnExcel(CString sExcelFile)//, CString ficheroSolo)
{
CDatabase database;
CString sDriver ;//= "MICROSOFT EXCEL DRIVER (*.XLS)";
sDriver = GetExcelDriver();
CString sSql;
TRY
{
// Build the creation string for access without DSN
sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s", sDriver, sExcelFile, sExcelFile);
// Create the database (i.e. Excel sheet)
if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
{
// Create table structure
sSql.Format( "CREATE TABLE Graficas (Fecha TEXT, Hora NUMBER,[Temperatura (ºC)] NUMBER,[Rocío (ºC)] NUMBER,[Presión (mb)] NUMBER,[Velocidad (km/h)] NUMBER,[Dirección (º)] NUMBER,Brújula TEXT)");
database.ExecuteSQL(sSql);
}
...more code ...INSERT INTO, etc ....
database.Close();
|
|
|
|
|
When the your function ends, the CDatabase object is destroyed because it passes out of scope. There's no need to destroy it yourself, unless you created it with new , in which case you'll have to delete it.
|
|
|
|
|
Ok, ok. You're right. It was my mistake.
Thank you, very much.
|
|
|
|
|
How to do this using SQL-DMO? Subscriber and publisher status is needed.
I keep submitting “VB” as a Priority-1 bug, but apparently no one here knows how to fix it. Nick Hodapp, Semicolon
|
|
|
|