|
Tom Archer wrote:
you'll need to use SQL Server Full Text Indexing. If that's the case, let me know as I wrote an article for another site a couple of years ago. If you need it, I'll find it and send it to you.
Tom, I too am interested in this, I write a lot of search utilities at work and this sounds interesting. Please send if you can find it. Thanks.
Nick Parker
|
|
|
|
|
SQL can do that...?
Wow thats pretty cool...how would it know Dick is an alternative to Richard...?
You would have to create a database for such things no...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
First off, I'm using VC6 with the latest service pack and MDAC 2.6/2.7.
I imported the ADO DLL.
I have successfully got an app to talk to any database (via a connection string and OLEDB/ODBC) and I can place resulting recordset results into the DataGrid via use of the SetRefDataSource method.
However, the DataGrid only accepts the ADO rs if it is disconnected.
What I want to do (and I don't know if it's poss, but it sounds like it should be) is to query the database, keep the rs connected, set it into the DataGrid and further results be pulled in as (and when) the user scrolls down the results.
I want this as some of our queries take some time and could return millions of rows. It would be nicer to respond quickly pulling back enough data to show in the grid and pull more results as the user scrolls.
Is this possible? If so, how might I go about doing it?
Thanks,
Simon
|
|
|
|
|
Howdy,
I have to write a WinNT(4) service which checks a few directories and writes files to a database.
The database is MS Access & it is accessed directly (ie not through ODBC) so I'd normally use AppWizard in VC to make an MFC with db support program. However, given that its an NT service, I'm writing it as a console application.
1) If I make it a console app with MFC support, does that blow the size of the thing sky high?
2) Can I access an MS Access database easily without using MFC functionality ?
3) Am I approaching this the correct way.
Thanks for any help,
Damian Del Campo
|
|
|
|
|
i am using C#, but this problem is language independant
i send a row from a dataset (dataset.getTable().Rows[x]) to a form that then displays that row in unbound controls. That form has a navigate forward and back button.
how do i find out the row's index in a dataset so that i may 'movenext' or even iterate from that point? the problem is that the form does not know the row index and it cannot call back to the owner form.
burnt
|
|
|
|
|
I think you have either got a problem of "who owns what data" here, or it's as simple as you don't store that 'x' (telling what row it is) in the appropriate place.
|
|
|
|
|
well, the dialog owns the dataset once it is invoked. the fact is, im not even using 'x'. the RowData is found through primary keys in dataset.find(). so i never really know what index rowdata is at.
the init() function of the dialog takes the rowdata and the dataset it came from. i need to nav using that info.
|
|
|
|
|
Unless you are the single user of that database, there is AFAIK no other way to solve your problem than to
1) use a versioning DB (e.g. Firebird at SourceForge)
or
2) create a temp-table with the results from your select.
You can't really iterate a (non-versioning) RDBMS. You can get a snapshot.
|
|
|
|
|
what does versioning have to do with simply getting the next row of a dataset object? its in memory, not cursored to the actual database and very much unbound. for all you care, i could be creating the dataset in memory from no db at all.
the question is, and remains, how do i get the index of a row in a dataset given a DataRow object, and a DataSet object, and NOT the index of the current RowData object.
if i can say dataset.Table().rows[20] and get a DataRow object, shouldnt i be able to easily code dataset.Table().rows[_row.Index + 1] ?
|
|
|
|
|
How can I get the following SQL statement to take a string value after FROM.
SqlString = "SELECT * "
"FROM ?????";
The string name is strFolderOpen and this will hold the name of the Access database to open.
Thanks, Aoife
|
|
|
|
|
What language are you doing this in, VB, Javascript, C++
This should do it in VB:
<code>
SqlString = "Select * From '" & strFolderOpen & "'"
</code>
Let me know...
HTH
Nick Parker
|
|
|
|
|
What design would be more efficient...?
I have 6 tables:
1) Hardware
2) Software
3) Programming
4) Networking
5) Database
6) Technologies
Each table has Word, Description field(s). Is this a normalized DB or would it be better to....
New Table:
===============================================
PrimaryKeyID | Categorey | Word | Description |
===============================================
This way they are all stored inside the same table and instead of searching seperate tables for the word, I search only based on Categorey...?
Is this possible in SQL...?
I personally feel the second approach is probably better and faster, but i'd like a opinion...cuz i've already designed it the first way however i'll redo it if the second is better.
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
OK - the first way is flawed for two reasons:
1. You're relying on the program knowing the names of all the tables.
2. You'd have to change the program if you added a new table.
SO - my solution would be this (_x_ = primary key):
tblCategories ( _ID_, Name )
tblWords ( _ID_, CatID, Word, Description )
Then, to list categories use SELECT * FROM tblCategories.
To list items in a specific category:
SELECT * FROM tblWords WHERE CatID=[your category ID]
To create a new category:
INSERT INTO tblCategories (Name) VALUES ("Test")
because ID would be an autonumber. You get the idea anyway, and that's properly normalised too.
--
Andrew.
|
|
|
|
|
Thanx for the response...
I've re-done what I originally had into something like
Table
==================================
ID - Category - Word - Description
Not quite what you've suggested, but is it not similar and atleast better than my first approach...?
Thanx again!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I have to admit I'm at a loss here. I need to connect to Sybase. Does any one know where I can get a detailed list of providers? Suerly I'm not the first person to run into this problem.
|
|
|
|
|
I love the following link, it contains almost every type of connection string example available in ADO:
Connections
HTH
Nick Parker
|
|
|
|
|
Hi guys, is it possible to create a sproc that takes for example a table name and a column name and then performs a SELECT using those input parameters? If so how can I do this and still be able to pass back a return status based on the results of the SELECT statement?
Regards
Senkwe
Just another wannabe code junky
|
|
|
|
|
Take a look at sp_executesql in Books Online. I use it to execute arbitrary sql statements in some of my stored procs. Not sure what status you get back besides success or failure though.
I think a straight EXECUTE or EXEC may also do the trick.
Bruce Duncan CP#9088, CPUA 0xA1EE, Sonork 100.10030 Hi everyone. My name's Bruce. And I suffer from VB.
|
|
|
|
|
thanks!
Senkwe
Just another wannabe code junky
|
|
|
|
|
Hi..
How can I create UDL(Universal Data Links)files programmaticaly without invoking the OLEDB Data Link Config Dialog? I already have the string connection used to connect the database. I´m using only ODBC...
Thanks.
|
|
|
|
|
Hi,
in Oracle 8.1.6 I have stored procedure:
MY_PROCEDURE( my_cursor OUT ref_cursor_type, param2 IN NUMBER, param3 IN NUMBER) AS
BEGIN
IF param2 = 0 THEN
OPEN my_cursor FOR
SELECT col1, col2, col3 FROM table1 WHERE some_id<=param3;
ELSE
OPEN my_cursor FOR
SELECT col1, col2, col3 FROM table1 WHERE some_id>param3;
END IF;
END;
When I try this (in MSVC++):
ADODB::_RecordsetPtr pRec;
pRec.CreateInstance(__uuidof(ADODB::Recordset));
pRec->Open( "MY_PROCEDURE(NULL,10,10)", _variant_t((IDispatch*)m_pConnection,true),
ADODB::adOpenForwardOnly, ADODB::adLockReadOnly, ADODB::adCmdUnknown);
while ( !pRec->adoEOF )
{
...do something...
}
pRec->Close();
I can't enter while block because pRec is empty.
I can enter while block only when I use:
pRec->Open( "SELECT col1, col2, col3 FROM table1 WHERE some_id<=10", _variant_t((IDispatch*)m_pConnection,true), ADODB::adOpenForwardOnly, ADODB::adLockReadOnly, ADODB::adCmdUnknown);
Why? Where is the problem?
|
|
|
|
|
|
I am not very familar with Microsoft Access,but it seems that when you encrypt a access file(in menu tool->security),you needn't enter a username.Now the problem come:
In VB6.0,how can i connect to such a encrypted file?By data control,i didn't find any property related to database security;by ADO,the connection string shall contain a username,but what's the username to such a file?I tried leave it empty,but it caused a error
|
|
|
|
|
I don't know about VB6,I'm VC guy,but in VC I can pass only file name for connection string:
"DataSource=...\\filepath"
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
in ConnectionString you just tell the filename,but you still pass without "invalid password" error?(that's what i met in my application)
what object of ADO you use? connection or recordset in VC?
|
|
|
|