|
I have a net management application (coded in Win32 API) and need to have a database connectivity.
Idea is that an agent would run on each computer on the network and collect information about it and send it to a central database (probably MySQL).
What is the best way to send this info? I don't want to use COM, not very familiar with it and want to keep app as simple as possible.
Thanks
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
hi,
There are many ways, but first what kind of database you use? (Oracle or MS Access database)
and what development envir. you are using? (VC++ 6.0 or VB6)
DanielO
|
|
|
|
|
Thanks for your interest.
I'm using VC++ 6.0.
There is a MySQL database running of a Linux server, and I need to connect to that database, to provide information about each PC, so the net admin could run a simple query and see the state of the network and of course each machine as well.
So what's the easiest way to connect to this database? Don't really want to use COM as this is quite time limited project.
Thanks
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
hi,
i suppose you can do like this...
go windows, control panel, data sources obbc (via system/admin tools in W2K)
tab system dns add new choose sql server... etc.
in MFC 6.0 Add a new class, derived of CRecordSet, choose your new made sql server connection
and pick your table
hope it helps,
DanielO
|
|
|
|
|
What parameter should I set and where so that each time I run my program, a new database is created? I'm using the recordset.Open and didnt see anything there I could set...
Thanks,
ns
|
|
|
|
|
hi,
i have a access database with serveral tables, one of the table was named "Language"
While opening via ADO like:
pRecordset->Open ((IDispatch *) pCommand, vtMissing, adOpenForwardOnly,
adLockReadOnly, adCmdUnknown);
which generates a unknown error (" (1)") -> try catch
after almost two hours of debugging i couldn't figured out why it didn't work
but then i renamed the table in "LangTexts" and everything works fine!
i wonder what another names shouldn't be used...........
DanielO
|
|
|
|
|
Language could be a keyword, try it as a [Language], might help.
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
hi,
i just tested your idea, and you are right!!
thank you
DanielO
|
|
|
|
|
Can somebody tell me if its possible for a stored procedure to run a job.I have a case where in my user might want to generate the report from the form and then see the output as an excel file.I already have a job that runs the query and spits it out to an excel file.
But Now this same query must be done when the user wants. So i want to have a stored procedure that would execute the job whenever the user wants it from the website.
Please giveme some links to literature that can help me out.
Regards
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
If your user only want a query they can send a their select statement to mail server of SQL and then wiht sp_processmail stored procedure they will recieve their query,but I don't know about your case.I know very cool site about SQLServer.You can go there and put your question there.
www.Sqlteam.com
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
sp_start_job [@job_name =] 'job_name' | [@job_id =]
job_id
[,[@error_flag =] error_flag]
[,[@server_name =] 'server_name']
[,[@step_name =] 'step_name']
[,[@output_flag =] output_flag]
where
[@job_name =] 'job_name' is the name of the job to start.
[@job_id =] job_id is the identification number of the job to start.
[@error_flag =] error_flag is "reserved"
[@server_name =] 'server_name' is the target server on which to start the job.
[@step_name =] 'step_name' is the name of the step at which to begin execution of the job and applies only to local jobs.
The return code values are 0 (success) or 1 (failure).
This example starts a job named Nightly Backup:
USE msdb
EXEC sp_start_job @job_name = 'Nightly Backup'
|
|
|
|
|
I cannot find documentation/tutorials ANYWHERE for SQL Server 2000. All I want to do is increment my primary key automatically with a predefined "first two chars". For instance, when I take a New User request from my web site, I want my PK to be NU1, auto incrememnt NU2, NU3, etc...I'm sure it's a cinch...can anybody tell me how?
P.S. I have really benefited by using this site. Thanks for everyone's help on past questions. Hopefully, I'll be able to help answer questions one day!
|
|
|
|
|
How about using an "instead of" trigger.
Search for triggers in BOL and you should find loads of info.
|
|
|
|
|
I have some password protected paradox files that I need to access from within dotnet. I can get access to the uprotected ones fine (OleDb->ODBC->Paradox), but can find no way to pass the password into the connection.
Anyone else had to do this and got it working?
Thanks
Stephen.
|
|
|
|
|
I'm using the following to connect to a database on the AS/400 via ASP. This code works correctly in my VB app but not in ASP. The result set returns from a library other than VENDORLIB2 specified below. Any ideas?
[cn.Open "Provider=IBMDA400;Data Source=????;", "???", "???"
Set cm.ActiveConnection = cn
cm.Properties("Updatability") = 0
‘Stored Proc Example
cm.CommandText = "{call VENDORLIB2.???('123456789', '')}"
Set rs = cm.Execute(nRecords, , adCmdText)]
|
|
|
|
|
Anonymous wrote:
The result set returns from a library other than VENDORLIB2 specified below. Any ideas?
Are you using it in the same machine ? With the same user ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
|
|
|
|
|
Can any one please suggest me an efficient way to convert VARIANT to std::string
|
|
|
|
|
Is there a quick way of running an SQL query that will provide the maximum length of data that can go in a particular column? I created a table, and want to be able to limit text input so that the maximum field length is not exceeded
|
|
|
|
|
if you´re using ADO, you can use the DefinedSize propertie.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
|
|
|
|
|
If you are using SQL Server then:
SELECT CHARACTER_MAXIMUM_LENGTH
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'yourtablename' AND
COLUMN_NAME = 'your column name'
|
|
|
|
|
This Project (Book Store Management System) have the necessary parts include:
# Employee's system - it will display who is taking care of the counter on
that particular day.
- this system will not keep track on the payroll of the
staffs.
# Stock Update System - it could update the amount of stocks.
# Sales system - it can help to keep track of how many items which have been
sold.
# Member system - it will store the member's detail whenever the customers want
to register as member of the book store.
- this system will be used by clerk only.
# Password Login - it is the essential component of the starting the system.
- This password login must not be a fixed one but indeed it
could change from time to time.
These 4 system will be handle by the cashier.
--------------------------------------------------------------------------------
This project actually is a free topic, so we, students are free to choose what we want.
--------------------------------------------------------------------------------
Thus, this project is my own idea. If you wish to add some ideas or commends, feel free to do so. I would appreciate it very much.
I hope you can understand my question.
Please help me in the source code.
Thank you.
Aaron
|
|
|
|
|
I'm not sure what it is you are asking for, unless you are asking someone here to write the source for you. This will not happen, however if you do have a question, there are many here among us (great Jimi Hendrix line too ) that would be glad to help you out.
Nick Parker
|
|
|
|
|
I have the following tables:
CREATE PLAYER (
PLAYERNO INT UNIQUE NOT NULL,
NAME CHAR(20),
...
PRIMARY KEY(PLAYERNO)
)
CREATE TABLE GAME (
GAMENO INT UNIQUE NOT NULL,
PLAYER1 INT,
PLAYER2 INT,
HOURS INT,
...
PRIMARY KEY(GAMENO),
FOREIGN KEY(PLAYER1) REFERENCES PLAYER(PLAYERNO),
FOREIGN KEY(PLAYER2) REFERENCES PLAYER(PLAYERNO)
)
How do I retrieve, for every player, the total number of hours he played as Player1 and the total number of hours played as Player2? The resulting table should be something
like:
PLAYERNO HRS-PLAYED-AS-P1 HRS-PLAYED-AS-P2
|
|
|
|
|
I guess this will work:
select 'PLAYERNO' + game.player1 ,sum(game.hours) + 'hours played' as P1,'PLAYERNO' + game.player2 ,sum(game.hours)+'hours played' as P2 from game where gameno = @yournumber
I'm not sure but maybe you nedd some data conversion when you add 'PLAYERNO' to game.player
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I'll gladly help out, but you haven't asked a question yet?
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|