|
Thank you , the second HOWTA article looks very interesting and elegant. Meanwhile i managed to do it by dropping a Column, for example with
[Sheet1$A:A] as tablename, and creating a new Table with same syntax passing a new "table" name.
niklas
|
|
|
|
|
Is there a way to SELECT from all tables of a specific "Type" in SQL Server 2000? For instance, I have abotu 50 tables that are of "User" type that I want to query, and I am not sure of the most efficient way. If it helps, this is the information I am wanting from ALL tables because they all contain these columns:
SELECT submitDate, requestorLastName, requestorFirstName, urlToForm, nof, status FROM <tablename> WHERE status = 'OPEN'
Can someone tell me the best way? Thanks...Robby
|
|
|
|
|
You can start with this:
sp_MSforeachtable 'select * from ?'
and then customize the select with whatever you want.
|
|
|
|
|
This is a great command. I can't seem to get it to do what I want. I have the command, but it seems to be just "picking" a table out of the database and displaying the properties. I am attempting to display this information in an HTML table. Here's the code:
sqlstr="sp_MSforeachtable 'select submitDate, requestorLastName, requestorFirstName, urlToForm, nof, status from ?'"
Set results = MyConn.Execute(sqlstr)
submitDate=results("submitDate")
requestorLastName=results("requestorLastName")
and so forth for each column...
I have approx 50 tables, and my html output only displays entries for only one of the tables...what do I need to do to be able to query all and display all for whatever table matches the query? Thanks
|
|
|
|
|
This is because you're getting multiple recordsets. When you reach the end of the first recordset, use the NextRecordset method of the recordset to get the next table.
Concussus surgo.
When struck I rise.
|
|
|
|
|
Does anyone know now to use mySQL's specialized SQL structures with MFC. I'm new to mySQL and I don't know any other way besides the SSQLS to write information to a mySQL db. I've tried using the sql_create_5 macro but it seems like it only allows you to use 5 fields and I need to use more than that.
Any help on this at all would be very much appreciated whether it be using the SSQLS or any other way to write to the db.
Thanks in advance.
- Monrobot
|
|
|
|
|
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
|
|
|
|