|
seems you just need to specify the WMD file path in the system database variable..
check :
http://www.able-consulting.com/ADO_Conn.htm
http://www.Connectionstrings.com
|
|
|
|
|
Thanks
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I don't have ADOexpress from borland, but I want similar ADO components. I looked and found a few free ones, but only for Delphi. I found no free ones for C++ builder.
Does anyone know where to find what I am looking for?
Best wishes to all!
André
|
|
|
|
|
As I have this,
Dim CommandText2 As String = "Select SUM(PeriPrice) FROM Peripheral Where PCID='P0003'"
It sums up, and displayed "3399.000" on the datagrid.
But I want - 3,399.00.
Is there any way to do it?
Please help.
Thanks.
|
|
|
|
|
Select Right(Replicate('',10) + Convert(varchar(11),Convert(Decimal(10,2),SUM(PeriPrice))),11) FROM Peripheral Where PCID='P0003'
|
|
|
|
|
I dont' know if this is the right place, but someone please help.
When using ms soap in a vb macro I get this error, and I really don't know how to fix the damn thing:
"WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: Access is denied.
HRESULT=0x1: Incorrect function.
- WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect.
- Client:One of the parametr supplied is invalid"
|
|
|
|
|
Hi,
I have this sql procedure that i need to run once every day.
Can anyone please tell me how can i do that.
Thanks
|
|
|
|
|
checkout documentation for sp_help_job and related stored procedures
|
|
|
|
|
Hi,
when using SQL Server 2000 one has the option of creating scriptfiles for all database objects, such as tables, sp's, views, users, roles, etc.
I need to write a tool which can perform the same thing and I need a starting point. Are there any ready made classes or libs out there? What SQL system-procedures are used to collect this information?
Any pointing appreceated.
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
All the information you need is in the system tables. These all start with 'sys' and exist in each database; The master database has extra tables that govern the whole server. The details of each of the system tables can be found in the books online.
There is also the INFORMATION_SCHEMA views which are on the master database. They use the system tables interally, so if you want to see how the systemp tables work then looking at the source for these views is quite useful.
Does this help?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Yes, Colin, it does help indeed (at leaster after recovering from the first shock)! Thanks very much!
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
Matthias Steinbart wrote:
at least after recovering from the first shock
Shock?! What was shocking?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Not your answer, I just had a look at the system tables and estimated the amount of work it'll take to get a grip of this...
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
True, there are a hell of a lot of self referencial joins. I once ended up with one SELECT with about 8 joins - 3 of which were to sysobjects. Luckily I wasn't doing anything too complex. However, like I said, check out the definitions for the INFORMATION_SCHEMA views on the master database as they help a lot if you want to see examples of how it all hangs together.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I have a lot of this done as part of a database build tool I am developing over on GotDotNet...
Check out the code in the "SQL Server Data schema providor" classes - shows how to list tables, views, users, user groups, stored procs and the fields, permissions, indexes etc. that apply to them.
|
|
|
|
|
CREATE PROCEDURE pr_InsertDictTable
@intID int,
@vchrValue nvarchar(50),
@vchrWesBarCode nvarchar(10),
@vchrTableName varchar(20)
AS
declare @sql varchar(1000)
set @sql = 'INSERT INTO ' + @vchrTableName + ' (Id, Name, PDACode) VALUES ( '+@intID+','+@vchrValue+','+@vchrWesBarCode+')'
print @sql
GO
Any problem in this procedure?
======
You need a head to program. Cool, fast and sharp.
|
|
|
|
|
set @sql = 'INSERT INTO ' + @vchrTableName + ' (Id, Name, PDACode) VALUES ( '+@intID+','+@vchrValue+','+@vchrWesBarCode+')'
->
set @sql = 'INSERT INTO ' + @vchrTableName + ' (Id, Name, PDACode) VALUES ( '+ CAST( @intID as varchar )+','+@vchrValue+','+@vchrWesBarCode+')'
|
|
|
|
|
Yes, plenty.
1. It's pointless. All you're doing is printing a string. Why not just generate the string at the caller?
2. variable @sql is not needed. you could just "print 'insert into ... "
3. It won't work. You need to CONVERT(varchar(10),@intid) before you can use it as a varchar.
4. You're mixing nvarchar and varchar. and implicitly casting nvarchar to varchar, thus negating the whole point of using nvarchar in the first place.
5. I think hungarian notation in a database is evil.
6. The main point of stored procedures is that they're compiled and hence more efficient. You're not leveraging that efficiency at all here.
jon
#include <beer.h>
|
|
|
|
|
Hi,
I am writing a few extended stored procedures for SQL Server database. A few of the functionality limitations for which I could find any answers are as below,
- How can we pass data that is larger than 255 characters to the extended stored procedure as parameter? Similarly is there a way to pass the long data results back (basically strings with length > 255)
- How can we use the resultset returned by the extended stored procedure as a virtual table in the T-SQL functions/procedures?
Has anyone else come across these limitations? Kindly share any possible logical solution to overcome these situations.
Thanks in anticipation
Anil
|
|
|
|
|
Hi All,
I am writing a multithreaded application in Visual C++ 6.0, which uses ADO to connect to either an access or sql database.
My question is, since many of my threads want access to the database, for both reading and writing, what do I need to do to thread safe it? Can I just have one global _ConnectionPtr and allow all the threads to use this, or do I need to wrap it in a section?
Many Thanks,
|
|
|
|
|
How can we update or change the content of a text file using triggers? If anyone have solved this problem earlier please help me.
Thanks
|
|
|
|
|
I have created a regular dataset using the following statement:
[CODE]
DataSet myDS = new DataSet();
. //initializing code to create the neccessary
. //tables, columns and constraints
.
[/CODE]
but then when I created a datagrid and attempt to assign my dataset and datamember with my dataset and datatable respectively via the properties menu, the editor failed to recognize my dataset!
I have tried to check my dataset and verified that it's okay.
What puzzles me are the following questions
Firstly, why doesn't the controls recognize the dataset?
If I have used the Visual Studio.net's GUI editor to create the dataset and define the tables and columns there, the datasource property actually recognizes it. Further investigation reveals that it is a class that inherits from dataset(correct me if I'm wrong). Therefore, if I intend to code my own dataset of this sort, what should I do and what interface should I derive from?
I thank you for your patience for reading up to this point. And I really do appreciate if anyone here could help.
My thanks in advance.
The confused one
|
|
|
|
|
I beleive it has to be added to your form to be seen by the wizards. If you use a custom dataset this can be a pain. Depending on the application, you can build your datasets into a dll and then add them as a component on your toolbar where you then drop the on your form and that seems to work well. Not sure of other methods to make them see them.
I think it would be a great feature if there was some attribute that could be added to any collection that would allow the wizard to see it and add it to a form without having to go through hoops. For me, I usually put all my datasets and data managers into a Data abstraction layer, so most of the time the wizards are useless unless I use the dll method above.
Rocky <><
www.HintsAndTips.com - Now with GMail Queue
www.MyQuickPoll.com - 2004 Election poll is #33
www.GotTheAnswerToSpam.com
"We plan for the future, we learn from the past, we live life in the present!"
|
|
|
|
|
Hi,
I've written a stored procedure which should return a specific value and has an additional OUTPUT parameter. Here goes the code:
<br />
CREATE PROCEDURE dbo.Update_AddresseInfo<br />
<br />
(<br />
@UserID int,<br />
@DateModified DateTime,<br />
@ElementID int,<br />
@Street varchar(50),<br />
@City varchar(50),<br />
@ZIP varchar(50),<br />
@NewDateModified DateTime OUTPUT<br />
)<br />
<br />
AS<br />
declare @RetVal int<br />
declare @DateNow DateTime<br />
set @DateNow = GetDate()<br />
<br />
-- do some stuff <br />
<br />
UPDATE dbo.AdresseInfo SET<br />
Street = @Street, <br />
ZIP = @ZIP, <br />
City = @City, <br />
DateModified = @DateNow<br />
WHERE<br />
ID = @ElementID<br />
<br />
if @@ERROR = 0<br />
begin<br />
set @NewDateModified = @DateNow<br />
set @Retval = 0<br />
end<br />
else<br />
begin<br />
set @Retval = 2<br />
end<br />
<br />
-- log this event<br />
exec LogEvent @UserID, 1, 1<br />
<br />
select @Retval<br />
RETURN <br />
Unfortunately the NewDateModified does not contain what I expect, eventhough I've created a SqlParameter object with the correct Direction. I guess the problem is somewhere in my SQL code.
Any help is greatly appreceated.
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
At a guess, @@ERROR isn't being set to 0.
Have you tried setting the value outside the IF to see if it gets returned?
Michael
CP Blog [^]
|
|
|
|