|
Hi,
I´m connecting to a SQL Server 2000 placed on a MS Windows 2000 Server via LAN from a MS Windows 98 computer. My program (MS VC++ 6.0, ADO, OLE DB)connects OK, but eventually crashes and also adds 2 mysterious characters in different fields in the database.
If I run the program from a MS Windows 2000 computer via LAN-network everything works perfectly!
What is wrong/different with the MS Windows 98 computer???? I´ve tried almost everything - installing MDAC 2.6 RTM, DCOM98 1.3 and so on... on the MS Windows 98 computer. Nothing helps!?!
I sure hope someone is able to help me out!
Jesper Smedegaard
|
|
|
|
|
I need to be able to do the following using an SQL statement:
SELECT TOP 25 * FROM [Table] WHERE [Condition] ORDER BY [Column]
Except I want to be able to specify the start position, i.e. start n rows into the table and then extract the 25 rows I need.
I don’t know how many rows will be in the table, and there is no field that has any form of incremental value (so I can’t just say [Condition] = [Table].[Column] > n ).
The table might contain many thousands of rows, so it is unfeasible to retrieve them all then ignore the one’s I don’t want.
So, I guess my question is how can I retrieve x rows from the table, starting from row n, based on the results of my ORDER BY clause.
This must be possible, surely?
David Wulff
dwulff@battleaxesoftware.com
|
|
|
|
|
I know you can use SET ROWCOUNT to limit the number of effected rows. I'm not sure if there is anything to set the start position. Interesting question though.
|
|
|
|
|
You can not do that, sorry. (I have also needed it)
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I had guessed as much Why oh why did the original designers of SQL not think people would need that functionality? It's common sense if you just want to retrieve, say, 20 rows from a fifty million row table, that you would rather not return the first 49,999,980 only to ignore them.
David Wulff
dwulff@battleaxesoftware.com
|
|
|
|
|
I have a SQL server and I would like to be able to write an installer to create the database for the administrator. Currently the admin has to run the query analyzer and open the .sql file that creates the database, all the tables and the login I provide and execute the query. How do you go about executing this type of query from an external program?
|
|
|
|
|
I have done this a couple of times.
Go in to the SQL Server admin, and script yopur database.
Then you get a SQL file with a lot of SQL "Queries" in. After each query there is a "GO" statement.
Just take each of those queries, without the GO part, and execute them from your installer.
There's a lot of articles here on CodeProject about how to connect to a database and execute SQL Queries.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi all,
I need to access some databases. I know what ADO and ODBC can do as far as I use user defined Queries. The question is waht about stored procedures.
Can ADO or ODBC or both access them?
Thanks in Advance.
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
Yes, the two tecnologis can execute Stored Procedures.
ADO has the command Execute, or Open, depending of the Stored returns Rows.
And ODBC has SQLExecuteDirect, or SQLExecute
Cheers!!!
Carlos Antollini.
|
|
|
|
|
You also have the choice of using OLE DB Consumers, the prefered way in Visual C++ when using OLE DB.
|
|
|
|
|
Does anyone know of any articles or information related to returning a recordset from ADO and C++ to a scripting or vb client?
Thanks alot!
Jon
|
|
|
|
|
You can use, ADO from VB.
ADO is a COM object, is for that You can use ADo from VB.
Cheers.
Carlos Antollini.
|
|
|
|
|
I know I can use ADO from VB, that wasn't my question, but thanks for trying.
I have a dcom dll that I want to return an ado recordset from and make it available to vb or scripting clients.
Anyone have any info or links to articles that are related to my problem? I will be most appreciative!
Thanks!
|
|
|
|
|
I understand, You want to make a COM Dll that returns a ADO Recordset?
Regards
Carlos Antollini.
|
|
|
|
|
Yes, that's correct. I thought I had seen an article or some info on how to do it somewhere. I may be mistaken however.
I want to return a recordset from a COM/DCOM dll written in Visual C++ to a scripting or VB client.
Thanks Much!
|
|
|
|
|
You need to build a ATL Project.
look Into the site, Info About ATL and ADO.
If you don't find nothing, I can send you a sample, of Using ADO into ATL Project.
I Work every day with that Kind of Project.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
Cool, I found some info here and on microsoft's site in regards to doing this with ATL.
Thanks!!
|
|
|
|
|
see article at
http://www.codeproject.com/atl/atl_ado.asp
|
|
|
|
|
Hi
I think what you want to do is almost the same as what the RDS.DataFactory can do for you.
If you need to extend the functionality - you can create your own based on the DataFactory.
Search for RDS in the MSDN
|
|
|
|
|
I installed .Net,and I found the component writed with VB was correct while debug step by step,then I make the dll.But it does not work correct.(In one method of this component ,I called one function of another dll just for unzip files.)
If this is caused by .net?
sandos
|
|
|
|
|
I am building an application that will require a database to store information. I am wondering what ones are available for me to use.
I like the ease of distribution of Access, just dump the file on the target machine make sure the newest MDAC is installed and of you go with ODBC calls or whatever. Problem is when I attempted to setup a database I couldn't create table or field names as whatever I liked.
I could name evrything to anything in SQL Server but it requires the files and MSDE on the target machine to run. This is annoying.
Is there a database out there that allows me to create table and fields names to anything I like, doesn't require something like MSDE to access it programatically? I wouldn't mind free as I may want to create some application in my personal time for free distribution and I don't want to break the bank doing it.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
Why couldn't you name your tables and fields in Access (=Jet) as you like? As far as I know there is little difference between Jet and SQL Server?
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Have to look into it again, I tried a couple of months ago and seemed to get locked into a wizard interface that kept giving me choices of existing table and field names. Then got the sh*ts and moved onto SQL Server, just think it is overkill for any litle dinky stuff I will work on in my own time at the moment.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
Problem is when I attempted to setup a database I couldn't create table or field names as whatever I liked.
Did you try with Dao or with ADOX?.
I can to do that.....
Try with ADOX or with CDAOWorkspace, CADOTableDef, etc.
If you need samples, please let me Know.....
Best Regards!!!!
Carlos Antollini.
|
|
|
|
|
My descriptive powers of the written word have failed me again, I'm a moron. What I was trying to say was -
When creating a database from within Access itself I couldn't just name the tables and fields they contained anything I wanted, a wizard kept getting in my road and pissed me off so much I went to SQL Server which was overkill.
I will pul my head in, try all this again and learn to express my question better next time.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|