|
I've always used this site http://www.learnasp.com/classic/[^] for my ASP problems - pretty much covers everything you'll need.
but like Christian says Server.CreateObject is what you need.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
I need to retrieve table schema given a table data.
schema information - for a given table - should include:
1. list of columns
2. data type of each column
3. number of records in a table
4. total number of columns
can anyone tell me the API to use for ODBD and ADO to get me up to speed?
Thanks!
norm
|
|
|
|
|
When you use ADO API's to work with database,after you query from that table and fill RecordSet object you can use these methods and properties:
norm wrote:
4. total number of columns
Count property of Fields object.
norm wrote:
1. list of columns
fieldsobject->GetItem(index)->GetName() will return name of EACH column.
norm wrote:
2. data type of each column
fieldsoblect->GetItem(index)->GetType() will do that.
norm wrote:
3. number of records in a table
RecordCount will return number of rows.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
thanks, that's very helpful of u
norm
|
|
|
|
|
How to process the ... in brackets?;P
|
|
|
|
|
How do you mean - that IS how printf is written, isn't it ? CString::Format also works that way, and the source is on your hard drive if you have VC.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
try searching google for va_start, va_arg and va_end.
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
You can use va_arg, va_end, va_start in order to access the arguements that are stored in the ... operator. However, if you are working with C++ and you plan on creating a function that supports a feature like this, it is a lot safer to use iostreams to accomplish this. This will insure that your arguements remain type-safe, which is a major advantage over the C-style implementation.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
char Eofl[]= "\\EndofLine";
char Tab1[] = "\t";
char szItem5[] = "[Underline]";
DDEPoke(idInst, hConv, EndofDoc, szData3);
DDEPoke(idInst, hConv, EndofDoc, Tab1);
DDEPoke(idInst, hConv, Eofl, Tab1);
LPTSTR lpsz = new TCHAR[m_Surname.GetLength()+1];
_tcscpy(lpsz, m_Surname);
DDEPoke(idInst, hConv, EndofDoc, lpsz);
this code is a part of a program which sends data to MS Word using DDE. I manage to find the EndofDoc, Tab,
but cannot find the EndofLine.
if I call the EndofLine it does not send the data to Word.
|
|
|
|
|
i want to creat my own gina dll in order to disable ctrl+alt+del.can any body tell how to creat a gina dll that do nothing when i press ctrl+alt+del and perform all other operation that are performed by the msgina.dll
and how to rplace it with previous dll?
r00d0034@yahoo.com
|
|
|
|
|
Am I the only one who sees two letters prior to gina.dll every time this question is asked ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
Am I the only one who sees two letters prior to gina.dll every time this question is asked ?
nope.
Here's a picture!!![^]
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
Chris Losinger wrote:
Here's a picture!!!
Exactly what I was thinking of as well
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Winlogon and GINA[^]
MSDN: "Winlogon has special hooks into the User32 server that allow it to monitor CTRL+ALT+DEL secure attention sequence (SAS) events. Winlogon makes this SAS event information available to GINAs to use as their SAS, or as part of their SAS. In general, GINAs should monitor SASs on their own; however, any GINA that has the standard CTRL+ALT+DEL SAS as one of the SASs it recognizes should use the Winlogon support provided for this purpose." AND "When Winlogon encounters an SAS event or when an SAS is delivered to Winlogon by the GINA, Winlogon sets the state accordingly, changes to the Winlogon desktop, and calls one of the GINA's SAS processing functions."
This may be of interest to you:
WlxLoggedOutSAS[^]..."The WlxLoggedOutSAS function must be implemented by a replacement GINA DLL. Winlogon calls this function when it receives a secure attention sequence (SAS) event while no user is logged on."
|
|
|
|
|
|
is your computer is on the network?
r00d0034@yahoo.com
|
|
|
|
|
|
Hi,
Can I start a thread in a function and keep it runnig even if app runs out of the function space?
Thanks in advance.
Extreme programming. Do the No.1
|
|
|
|
|
Do you mean when the function exits? sure.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Then how to start a thread and it can keep alive even after the function which started the thread return?
Extreme programming. Do the No.1
|
|
|
|
|
stevenson wrote:
Can I start a thread in a function and keep it runnig even if app runs out of the function space?
Yes,
use _beginthreadex or CreateThread depending on what you are doing.
_beginthreadex will initialize the C-runtime library on the new thread that you create.
CreateThread is the Win32 version and you will need to initialize the C-runtime yourself for this thread if you plan on using it.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hello I'd like to declare a char* that points to a void* but i dont know the best way to do this, I thought i could use type casting but it appears not.
I'm trying to use strcmp to compare 2 char* pointing to buffers the code is this...
void * __cdecl buffer= malloc(100);<br />
void * __cdecl buffer2 = malloc (100);<br />
__int64 filel1 =_filelengthi64( firstfiledone);<br />
__int64 filel2 =_filelengthi64( firstfiledtwo);<br />
if (filel1!=filel2)<br />
return 1;<br />
char* b,b2;<br />
int trys1=filel1/100,count;<br />
for (count=0;count<filel1;count=count+trys1)<br />
{<br />
fread( buffer, 1, 100, s1 );<br />
fread( buffer2, 1, 100, s2 );<br />
b= (char*) static_cast <char*> (void * __cdecl) buffer;<br />
b2= (char*) static_cast <char*> (void * __cdecl) buffer2;<br />
if ((strcmp (b,b2))==0)<br />
{<br />
printf ("ok");<br />
}<br />
}
But that way doesnt work so is there any way of easily doing this?
Also what is a volatile pointer. As i've previously copied a supposedly volatile pointer bit by bit, then re-used it later with no bad effects, is this method sloppy code?
Thanks hope you can help ! - Jason
ps tried to get rid of them errors in the code with the boolean expression things dont know if it worked
|
|
|
|
|
Jay2 wrote:
I'm trying to use strcmp to compare 2 char* pointing to buffers the code is this...
Not sure that this will fix things, however you need to check your declaration of your two character pointers. It should look something like this( you have char* b,b2; ):
char *b, *2;
Jay2 wrote:
Also what is a volatile pointer
Here is a link to save space. Data Type Qualifiers[^]
Hope this helps.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Wow, you really have to work on formatting your code a little bit.
Your casts are odd as well and you'll have problems because strcmp expects strings to be NULL (0) terminated, you are better off using strncmp so you can set a max comparison size (in your case 100.) Also, what happens if fread reads less than 100 bytes or past the end of a either file? MSDN states "The file-pointer position is indeterminate if an error occurs. The value of a partially read item cannot be determined."
If you malloc you better free ! You allocate memory, but then you do a return without ever freeing the memory, you also return without ever _close ing the file handles (or is this done somewhere else?)
Do you really need to use a void pointer? Take a look at the following example on MSDN: fread()[^]
If you just use a buffer of char, you should be on your way.
You should also check for end of files (using feof ), and read errors (fread returning 0). Error handling is extremely important, and should never never never ever be omitted for production code (ever.) For illustrative purposes, many people do omit error handling, usually with a caveat that they've done so, or that the lack thereof is implied
Hopefully this will help you on your way.
|
|
|
|
|
Hi, I know the casts are odd! I couldnt think of any other way of thinking about it... not sure even if it is the correct cast but as a char* and void* are stored in memory (I think) the same way then I decided it would be possible.
I have to use a void* for fread to read from the file into the buffer which is void*, I think your strncmp looks like what i need to use but will this still assume there is a NULL character to terminate the string?
Incase that doesnt work maybe i can use sprintf to write from the buffer into a string, but i never like doing that kind of thing as i'm not really a fan of sprintf, and as the buffer is in binary i'm not even sure if it will work fully, is there no way of comparing 2 buffers or arreas of allocated memory, how about taking one from the other and seeing if the result is zero as this would save me a lot of messing around!
Ok thanks the code i showed you was only a small section of the program and i have closed the files, but not free'd the allocate memory yet.
Oh is that link the one used in msdn v6.0 i know as thats the version i have it's old but thats all i have, and when i click the link i dont get anything at all!
Thanks i'll have a play around with msdn.. - Jason
|
|
|
|
|