|
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
|
|
|
|
|
I've got a stored procedure on an oracle database
PROCEDURE SEABUTTONS_LOAD
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
P_SEABUTTONS_REF REF CURSOR IN/OUT
UNKNOWN RECORD IN/OUT
NENABLED NUMBER(1) IN/OUT
CTEXT VARCHAR2(32) IN/OUT
CADDR VARCHAR2(20) IN/OUT
This procedure should return a recordset. However when I try to use ADO to get the recordset, I get the following error,
ODBC driver does not support the request properties. This seems to happen on the recordset open.
This is the code to open the connection
Set Connection = CreateObject("ADODB.Connection")
Connection.CursorLocation = adUseClient
Dim strConn As String
strConn = "DRIVER={Microsoft ODBC for Oracle}; SERVER=MarsLive; UID=welcomex; PWD=welcomex"
Connection.Open strConn
This is the code that I'm using to access the recordset
Dim strSQL As String
Dim lngRecs As Long
Dim oRS As Recordset
Dim cmdStoredProc As Object
'This code creates a command object.
Set cmdStoredProc = CreateObject("ADODB.Command")
' Connect the database to the command
Set cmdStoredProc.ActiveConnection = objectDatabase.Connection
cmdStoredProc.CommandText = "{call cti.SEABUTTONS_LOAD({resultset 12, P_SEABUTTONS_REF, UNKNOWN,NENABLED,CTEXT,CADDR})}"
cmdStoredProc.CommandType = adCmdText
'This code creates a recordset object.
Set oRS = CreateObject("ADODB.Recordset")
'oRS.CursorType = adOpenStatic
Set oRS.Source = cmdStoredProc
MsgBox "Before Open"
oRS.Open
MsgBox "Before Open"
Any ideas why this doesn't work. I'm afraid Oracle databases are a complete mystery to me. I've never had problems in SQL server. Any code, suggestions, articles would be gratefully received. It doesn't even have to be VB code
This problem has been driving me mad for an age
Thanks in advance
Michael
|
|
|
|
|
I have a question I am running a dual processor Xeon processor running IIS 5.0 and serving pages / info from an Access DB. I havnt run into any problems yet, but here is my question.
Is there a maximum of concurrent users that can query the DB at one time?
Are there any relevant restrictions that using an Access DB over say SQL server that I should be aware of.
Can anyone provide me with information as to the benefits related with running a SQL Server over an access DB?
It seems that when I am page loading from a MAC the server really chugs? any insight? I can use many PC's concurrently, but when I access the website with a MAC its quite a different story.. Any Help / Finger pointing to help would be appreciated.
recurse.org - Recusion For the Rest Of Us.
|
|
|
|
|
MSDN docs say that the max load for a multiuser Access DB is ~50 users. In other newsgroup conversations, I've heard people say ~10 or ~20 users is tops.
http://msdn.microsoft.com/library/techart/apg01.htm
This article points to pros/cons of using MS Access in a client/server scenario.
|
|
|
|
|
I Have a huge problem!
I want to show the records from a database with the following code. Behind the statement Where
should be a code that alows me to do the following:
Select * From 'tablename' Where ' The time is 8 ours later then the current time.'
for example: If there is a record in de column Begin_datum with this value: 06-06-2001 20:00 and the current time is 06-06-2001 12:00, then it must be shown on the homepage. It also has to stay shown until it has been deleted.
Who can make this work! I have done a lot of different codes, but nothing works. Getdate did not work. I hve put the code with this message. I hope that somebody can make it work.
Greetings
<%
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "accessDSN"
Set RS = Server.CreateObject( "ADODB.Recordset" )
RS.ActiveConnection = Con
sqlString = "SELECT * FROM Products Where "
RS.open sqlString
%>
<% Do While Not RS.EOF %>
<%= RS( "Begin_datum" )%>
<%
RS.MoveNext
Loop
RS.Close
%>
JP
|
|
|
|
|
I've found an easy-to-use ActiveX plugin which can convert Excel files into html easily! Many daily data report works becomes much easier since I download it.
By the way, it's called AAA EasyGrid ActiveX.
Available at http://www.share2.com/easygrid/
|
|
|
|
|
Yeah, I've downloaded one and had a try.
thank u for your kind recommendation.
By the way, it seems also great in connecting with all kinds of databases.
|
|
|
|
|
Who can help me with the following:
I have a database with a column Begin_date. When I use the statement Select * From ...... Where Begin_date (hours, -8, GetDATE ) i get a error. The problem is that My ASP server ( PWS in Win98 ) doesn't reconize getDATE. Who can help me with this problem!? Can you give me a working example?
Example:
I want to show all records from the column Begin_date that 8 ours before the date and time is reached. So if I have a record with: 06-05-2001 20:00 then it must be shown on 06-05-2001 12:00
It also have to stay shown until it is deleted. Who now's a asp code that make's this work.
Greeetings from holland,
Jan Pieter
Jan Pieter Elenbaas, Student in Holland.
|
|
|
|