|
How do i use the RowFetchCount property for ADODataReader
Bascially what i want to implement is paging
|
|
|
|
|
hi
Im working on an application with VC++ MFC as front end and sybase installed on unix server as backend.
Can anyone tell me which method ADO or MFC DB Classes(CRecordset,CDatabase etc..) is better suited for DB Connections.
Please give detailed explanation?
YOur Help will be highly appreciated.
Aky
|
|
|
|
|
Hi Friends,
Uptill now I was developing database application using vc++ and MSAccess as database. Now I am developing vc++ application(with doc/view architecture) with SQL Server(2000) acting as back-end and which is installed on a file server(installed on windows 2000). I need your help regarding follwing two questions:
1) How to connect front-end vc++ application running on a computer which is different than file server where SQL Server is installed and on which database resides. Database contains two tables presently.
2) How to create or write stored procedure and use it with front-end vc++ application?
Your help will be greatly appriciated.
Thank you in advance.
Bharat Gadhia;)
Help is always welcome
|
|
|
|
|
I've just recently started programming for SQL Server as well. Carlos Antollini's "A Set of Database Classes" article (found under General/Database/ADO) has been very useful to me. Most of it you are probably familiar with already. The key change needed to make it work for SQL Server is the connect string.
strConn = _T("Trusted_Connection=yes;Driver={SQL Server};Server=MyServer; Database=MyDatabase;")
If you have your SQL Server set to use Windows Authentication set Trusted_Connection=yes, otherwise set it to 'no' and send username and password information with the Open().
When opening the Recordset if the options flag is set to other than an OpenQuery of OpenTable, your query will be treated as a call to a stored procedure. None of my work yet has involved stored procedures, so other than telling you the class can handle them there is not much help I can give you there.
|
|
|
|
|
Send me a mail to cantollini@hotmail.com with your questions that a will help you.
Carlos Antollini.
|
|
|
|
|
How can I schedule a backup for SQL data base? I tried to set it in the Enterprise manager by right click on the database and then backup data base-> choosing shedule but it doesn't keep my settings and doesn't run the backup at the requested time and date.
I would be grateful for an answer...
|
|
|
|
|
Hi
I have a method in a Dll, which will return ADO recordset. This Record set has been sorted by SORT property of ADO recordset in side the DLL. It is working fine inside the DLL. But When I call the DLL method from ASP I am unable to get the recordset in sorted manner.
I would be glad if any of you can let me know how to recive the recordset in a sorted manner.
Thank you for your precious time.
Thota
Houston TX
|
|
|
|
|
Hi All,
I'd like to know the exact steps to follow for setting up a File and System DSN with ODBC using the SQL Server driver.
I am testing with PWS server and ASP for now on Win98 OS, but the SQL Server connection keeps failing and the ADO object creation fails as well.
Any help is highly appreciated in advacnce.
Cheers!
Masoud
|
|
|
|
|
Hi all.
The following code is really annoying me...
<cpp>
Dim rsTable As New Recordset
rsTable.CursorLocation = adUseServer
rsTable.CursorType = adOpenStatic
rsTable.LockType = adLockReadOnly
rsTable.MaxRecords = 100
Call rsTable.Open("Select * From Table", cnConnection, , adLockReadOnly, adCmdText)
It should return just 100 records but it returns ALL of the records in Table...
I need to allow the user to enter any sql select statement and give them a preview of the top 100 records. However, this is just running EXACTLY their input sql.
Any ideas?
Thanks
Pete
|
|
|
|
|
Ok. The MSDN says that the functionality in the driver for this property is NOT a requirement of a standard ODBC or OleDB driver. It seems that you'll be lucky if you find a driver that supports the MaxRecords functionality...
Oh Well
Pete
|
|
|
|
|
When you grab the input SQL from the user, change the statement to say "SELECT TOP 100 ..."
Of course, this requires you to do some intelligent parsing if the user enters something unusual for the SELECT statement.
|
|
|
|
|
I need to supply MDAC V2.6 with my app. I'd like to make my installatio program install it silently, so the user hardly knows it has been installed. I've downloaded the file mdac_typ.exe from the microsoft web site. Are there any say command line parameter that would make MDAC install silently?
Thanks for any help at all!
|
|
|
|
|
http://support.microsoft.com/support/kb/articles/Q192/0/09.ASP
|
|
|
|
|
i wanna get some data from the remote host in a local network by using odbc driver the microsoft supports.
But it takes much of time to get data from the remote host.
the connected network driver is named E. In control pannel , i selected mdb files
from the network driver E .
does somebody help me get data faster ???
// the part of source code here...
CRecCustomer customer; // derived from CRecordset. connected to customer.mdb file from the network driver .
customer.m_strFilter.Format("[id] = %ld", id);
customer.Open();
by peng-you.
|
|
|
|
|
1. Try to make it without the filter string! Filtering a recordset will take most of the time!
2. Also try to set the cursor to be on your machine, or maybe do this by using snapshot
|
|
|
|
|
|
Anyone who knows what this is?
|
|
|
|
|
SQL*Net is a pre-Oracle 8 transport layer used to communicate between your client and an Oracle database. Oracle 8+ uses Net8 to replace SQL*Net
|
|
|
|
|
Folks,
I am trying to develop an app for the Pocket PC, using embedded Visual C++ 3.0. I am new to Pocket PC development, and indeed new to Windows programming in general. I'd like to use ADOCE, but have been having great difficulty. The code examples from my books don't work, and essentially everything on the MS site refers to embedded Visual Basic. ADOCE programming under C++ doesn't seem easy, and it also seems like there are a lot of different versions of the relevant libraries, new versions are frequently introduced, and one must write code for each version. In any case, code examples or pointers to information would be much appreciated.
Thanks,
Matthew Fleming
mgf@mcw.edu
|
|
|
|
|
http://www.microsoft.com/MOBILE/developer/technicalarticles/adocecplus.asp
http://www.voscorp.com/PPC/Dev/VOADO/
Good Luck!!!
Carlos Antollini.
|
|
|
|
|
Hi
How can I get version of MDAC installed on my comp?
Ernst
|
|
|
|
|
Look at the fileversion in \Program Files\Common Files\System\ado\msado15.dll
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
In the article "A set of ADO Classes" by Carlos Antollini the function GetFieldValue is overloaded many times to return various 'types' of data.
bool CADORecordset::GetFieldValue(int nIndex, double dbValue);
bool CADORecordset::GetFieldValue(int nIndex, long lValue);
bool CADORecordset::GetFieldValue(int nIndex, int nValue);
The typical code for retrieving a value looks like the following:
bool CADORecordset::GetFieldValue(int nIndex, long& lValue)
{
long val = (long)NULL;
_variant_t vtFld;
_variant_t vtIndex;
vtIndex.vt = VT_I2;
vtIndex.iVal = nIndex;
vtFld = m_pRecordset->Fields->GetItem(vtIndex)->Value;
switch(vtFld.vt)
{
case VT_I4:
val = vtFld.lVal;
break;
case VT_I2:
val = (long)vtFld.iVal;
break;
case VT_NULL:
case VT_EMPTY:
val = 0;
break;
default:
return false;
}
lValue = val;
return true;
}
From what little I know about it, this function appears to be a good candidate for writing as a template. The source code is growing daily because I need to retrieve more data types.
Additionally, I've written a SetFieldValue function for Mr. Antollini's CADORecordset class which could also benefit by templating.
bool CADORecordset::SetFieldValue(int nIndex, int nValue)
{
_variant_t vtFld;
_variant_t vtIndex;
vtFld.vt = VT_I2;
vtFld.iVal = nValue;
vtIndex.vt = VT_I2;
vtIndex.iVal = nIndex;
m_pRecordset->Fields->GetItem(vtIndex)->Value = vtFld;
m_pRecordset->Update();
return true;
}
Anyone want to show me how to do this? or explain why templates will not work? The variant type to get/set looks like it may be the difficult part.
Thanx...
>>>--->Mike Osbahr<---<<<
|
|
|
|
|
A template normally helps in the same way that factoring helps; that is, you would need to be able to handle all (or most) of the VARIANT cases in a generic way. Unfortunately, this isn't the case in this scenario: practically all of the VARIANTs require a different cast to get them into their appropriate data type. Everywhere I've ever seen VARIANTs being converted in code, it is the same method you are using -- a large switch statement.
|
|
|
|
|
Anybody got any recommendations for good books on Oracle, especially in relation to ADO.
cheers
Michael
|
|
|
|