I've got several templates that we use for creating stored procs and such and they all include a standard header for author and version information. One of the fields is the creation date. Is it possible to have the template automatically populate that field with the current date when a new file is generated from the template?
what other method can you use to generate primary keys automatically. My boss disagrees with me using identity for the primary keys. He says it is not professional. I am working on SQL Server 2005 platform. Can anybody advice me?
I am currently reading Ralph Kimball's "The Microsoft Data Warehouse Toolkit". In the book it mentions creating template packages to speed up the creation of future packages. In the book they also mention creating solutions and projects.
All sounds fair enough but I am confused a little.
Where should the template package be stored?! I created a Project and renamed the default package as "TemplatePackage". I setup some standard data sources and package variables. Do I now create a new package and place it in the same project? Or should my template package be deleted from the project?!
i hear of a feature called TEMPLATES where you can save the data thats entered into any particular Dynamics SL screen and paste the data in to the same screen at a later time (saves time if there is data that is constantly inputed into the same screen over and over). my question is, where are the templates saved at on the hard drive? and can it be opened/edited in notepad or something else if say we want to make changes to the data before pasting/loading it back?
I've created a new Stored Procedure template and saved it to .Microsoft SQL Server90ToolsShellTemplatesSqlStored Procedure. I can view (and use) the template via the Template Explorer, however, I want this new template to become my default template.
What do I mean by this? - I want to be able to right-click on stored procedures in my object explorer, click New Stored Procedure, and be forced to use my new template, rather than Create Procedure (New Menu).SQL.
I just installed SQL2005 (and VS2005). When I run VSSQLCLRTemplates.vsi from the SQLCLR Project all the templates fail to install. It gives the error "Installation stopped because the directory for the ProjectType value did not exist. The project type is invalid for your installation of Visual Studio."
I do have a my documentsvisual studio 2005 directory. I am trying to start writting user defined aggregates. If I can install the templates manually, that'd be fine.
I'm currently working on a project that I'm having some design difficulties with and I was hoping that some of you could help me out. What I'm designing is sort of a webbased directory service based on different custom made templates. Imagine the yellow pages with different column requirements for each branch. Example:
I have designed a few tables that look like this: DECLARE @templates TABLE (TemplateID INT IDENTITY(1, 1), TemplateName VARCHAR(50)) DECLARE @attributes TABLE (AttributeID INT IDENTITY(1, 1), AttributeName VARCHAR(50)) DECLARE @template_attributes TABLE (TemplateID INT, AttributeID INT) DECLARE @values TABLE (ValueID INT IDENTITY(1, 1), TemplateID INT, AttributeID INT, Value VARCHAR(200))
INSERT INTO @templates SELECT 'Restaurant' UNION ALL SELECT 'DBAForHire'
INSERT INTO @attributes SELECT 'Name' UNION ALL SELECT 'Adress' UNION ALL SELECT 'TakeAway' UNION ALL SELECT 'YearsExperience'
INSERT INTO @template_attributes SELECT 1, 1 UNION ALL SELECT 1, 2 UNION ALL SELECT 1, 3 UNION ALL SELECT 2, 1 UNION ALL SELECT 2, 2 UNION ALL SELECT 2, 4
INSERT INTO @values SELECT 1, 1, 'Lumbagos TexMex' UNION ALL SELECT 1, 2, 'Mainstreet Oslo' UNION ALL SELECT 1, 3, 'Yes' UNION ALL SELECT 2, 1, 'Peso' UNION ALL SELECT 2, 2, 'Somewhere IN Sweden' UNION ALL SELECT 2, 4, '10'
SELECT TemplateName, AttributeName, Value FROM @templates a INNER JOIN @template_attributes b ON a.TemplateID = b.TemplateID INNER JOIN @attributes c ON b.AttributeID = c.AttributeID INNER JOIN @values d ON b.TemplateID = d.TemplateID AND c.AttributeID = d.AttributeIDThe problem I need help with is that with the current design all "Values" are defined as varchar(200)...is it possible to change the design so that it's equally flexible but also fasilitates different datatypes? In some cases I would like to have a description column with way more than 200 characters, and I'd also like to save numbers as actual numbers...not like my example above with "YearsExperience". Is it at all possible?? I would appreciate your insight on this...
-- Lumbago "Real programmers don't document, if it was hard to write it should be hard to understand"
Hello, I'd like to use OLE DB consumer templates, but I have troubles with changing values in my test DB. I've created a simple MS access DB 'ZK2Test.mdb' with one table 'pokus'. This table consist of one column with number (short integer). I can read values, thats works fine. But when I try to write something, it is not propagated into DB. I call SetValue and Update on cTable object and every call returns S_OK. When I try to read value of first row after my write, I get my new value of first column. But after moving cursor somewhere else and back to first row, reading first column of first row returns again the previous value.
In code example is my attempt to change value 1 from first row to 421 Sequence of commands is (C1 means Column 1):
// Open DB res = DTSrc.Open (L"Microsoft.Jet.OLEDB.4.0", "..\ZK2Test.mdb"); CHECK_RES(res); res = DTSession.Open(DTSrc); CHECK_RES(res); CDBPropSet propset(DBPROPSET_ROWSET); propset.AddProperty(DBPROP_IRowsetUpdate, true); propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE); res = cTable.Open(DTSession, L"pokus", &propset); CHECK_RES(res);
// Move to first row res = cTable.MoveFirst(); CHECK_RES(res);
dataPtr = cTable.GetValue(1); x = *((SHORT*)dataPtr); // Now the value of x is 1
x = 421; if (!cTable.SetValue(1, x)) { return FALSE; } res = cTable.Update(); CHECK_RES(res);
dataPtr = cTable.GetValue(1); x = *((SHORT*)dataPtr); // Now the value of x is 421
// Move cursor to the second row and back res = cTable.MoveNext(); res = cTable.MoveFirst(); dataPtr = cTable.GetValue(1); x = *((SHORT*)dataPtr); // Now the value of x is 1 (the original value, WHY!?)
I want to be able to create business intelligence project for reporting but the business intelligence project option is not there when I go to file/new/project.
When I first installed visual studio I chose visual basic/web development as the preference would this prevent other project types from being displayed?
I have a question regarding oledb templates in Visual Studio 2005. For some time I was trying to get through but I can't. Can anyone tell me how can I read the properties of the DataSource class being inside Rowset or Command class?
I mean: DataSource class is creating Session class. Session is creating Rowset or Command and so on.. But how can I read the INIT_DATASOURCE property of the DataSource class while for example a Command is called?
Could you give me a sample of code which retrieves the INIT_DATASOURCE property in the Execute method of the
CRowsetImpl class?
class ColedbRowset :
public CRowsetImpl< ColedbRowset, ColedbWindowsFile, ColedbCommand>
I have installed Visual Studio 2013 Express for Windows Desktop and Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013 yet there are no project templates for Analysis Services, Integration Services, and Reporting Services available when I attempt to create a new project.
Details of install are: Microsoft Visual Studio Express 2013 for Windows Desktop Version 12.0.40629.00 Update 5 Microsoft .NET Framework Version 4.5.51209 Installed Version: Desktop Express Team Explorer for Visual Studio 2013 06157-004-0441005-02546
We are using Reporting services 2005 and have been for some time. Recently we have started using the subscriptions as well. However we have come across a problem with this.
Currently we are updating our report templates by removing them and then creating them again. This worked fine until we started using subscriptions. Now, when the reports are removed, the subscriptions that are associated with the reports are also removed.
Is there a way to update a report template, without having to remove the report first? And can this be done programmatically? The code is currently publishing the reports by calling ReportingService2005.CreateReport(name, "/" + reportFolder, false, template, null);
Is there any way to change variable scope while using package templates?
I have created a package template that has several variables, a "typical" control flow and data flow. My goal was to try and use this as a starting point to create other packages within the same project and edit as required in the new package. I couldn't find any way (yet) to change scope of variables...these still show as belonging to the scope of package used to create the template.
I could not find The Reporting Service Project Template with Visual Studio 2008. It was available with Visual Studio 2005. How i can add the reporting service project into VS2008?
We are setting up developer machines with Visual Studio 2005 and SQL SERVER 2005 Client tools. My question is how do I get the templates for Integration Services into Visual Studio 2005 without installing BIDS?
I desperately need to setup the AD-HOC reporting on SQL server 2005. I think one of the templates that I need is in Business Intelligent Project Templets Reporting Model Template in Visual Studio Templates.
But I do not see it in there. Can some one please let me know where can I get the Reporting Model Template, or a link to where I can download or how to create it.
I have an application that uses SQL Report Builder to edit templates. When I go to add a dataset to add a custom field to the report, I get a permissions error (screenshot Error). When I check the credentials for the shared datasource, they are all grayed out, so I can’t verify the credentials being used (screenshot Error 2). According to SQL Management Studio, the user credentials have the right permissions. The weird thing is, I can access the datasets and shared datasource embedded in the report just fine. I just get a permissions error whenever trying to create a new dataset.
Hello, I tried to use bookmarks in OLEDB consumer templates and I have problems with using MoveToBookmark. This method sets cursor position correctly on bookmarked row, but it seems to me it doesn't set the right cursor position in DB. When I call MovePrev after MoveToBookmark, I will not get previous row of the bookmarked row. Simplified Example - I get bookmark of the first row, then move to the 3th row. Call MoveToBookmark (current row is no the first row). But when I call MovePrev I'will not get DB_S_ENDOFROWSET but the second row:
MoveFirst() bk = GetBookmark() MoveNext() MoveNext() // Now I'm on third row MoveToBookmark(bk) GetData() - Now I get data from 1st row MovePrev() GetData() - Now I get data from the second row!!
All calls to OLEDB returs S_OK. Does somebody now, whats wrong?
Hi, We are working on creating an automatic backup tool for our web application. Our goal is to run a script that "zips" the virtual host/application directory. We have the script to zip the application directory, but is there a way to run a SQL Backup and then zip the output easily? This is where we are struggling. Any Suggestions are appreciated Brent
I am getting an automatic rollback in a transaction that fails to insert a row, via a trigger, due to a duplicate key. The transaction is automatically rolled back and unless the error correctly handled a 'partial update' occurs. Why in the example below is the transaction automatically rolled back (statements 1 to 3) and is there any way of knowing what errors generate an auto rollback. For example if the duplicate key error occurs on the insert into table B below, and not the triggered update, then no auto rollback occurs.
Begin Tran -- 1 insert into A values ('A1') -- 2 updates OK insert into B values ('B1') -- 3 updates OK -- triggers insert into B_Hist -- 4 Fails with Duplicate Key error insert into C values ('C1') -- 5 updates OK Commit Tran -- 6 3902 error No corresponding Begin
Hi all, I am using the odbc connector to get a local table. I want that table to get populated every night automatically. How can i do that? Also i want to check if any existing record is updated/changed in the dsn database. Any help is highly appreciated. Thanks, Jeff.
I don't know very much about Sql Server and need help. I have two primary keys called AirlineCode e ID in the same table. This id is an automatic number. So I don't need to input this value, since it's created automatic. What I need is this ID be created automatic but for each new AirlineCode the ID starts as 1 again. For example : If I put AirlineCode = 220 then ID starts as 1. In another row AirlineCode is also 220, then ID is 2. But in another row AirlineCode = 500, then this automatic number come back to 1. then the rows can be like this :
Dear Friends, I want to Automatically take Backup at 7:00 p.m cutoff Time.and automatically restore the database..to a temporary database,generate my report and delete the database. Friends,this backup & restore should not require any user interface..it should me automatic. Plz can anyone help me out.
I have two sql 2000 server tables one is active and one is terminated (I inherited this db) and I was thinking of having the active table automatically update the terminated table when an employee is terminated. Access is at the front end and in the form of the active table theres a drop down text box that has the employement status(active, terminated, on leave...etc) so when the status turns into terminated i want the acitve table to send those records to the terminated table, ( the data in both tables are not exactly the same). looking into a trigger or stored procedure. This is the first time I've done this so I'm doing some reasearch on how to handle it. Any suggestions
well as I get further into this project of automatic updates I'm fining more and more barriers. The combo list box which indicates whether the employee is terminated or active might be a problem with sql since you cant create a Row source and a Row source type in a sql table. that combo box exsist in the properties of the form. The Row Source Type is a Value List. Shoot :(
I'm a SQL Server 7/2000 DBA and manages about 40 servers in different networks. Every morning I check through the Enterprise Manager if all Jobs (backup, maintenance, etc.) have run successfully. This check costs me 1 hour per day.
Because of a reorganization I've got some new college's and lost some college's. My new college's think this is to much work, so it should be automated. They only want the failed jobs to report an error on a website or something like that, and don't want to check 40 servers. I don't agree in this, because I'm affraid I'm going to miss some errors.
Hi there, I am testing the db mirroring, making sure it will auto failover. I've stopped the SQL services on my principal and then I looked at the mirror db is says it's restoring. It stayed like that for 10 min before I enabled the mirroring again. Anyone knows why it's not failing over??????
Here's my setup: SQL 2005 Standard, Server 1 Principal, Server 2 Mirror & Witness.
I have initiated database backup plan in 2005,occuring every 2 days.backup plan worked for the first 2 schedules,later backup plans is not working.I have checked the time and date setups,its all fine.how to solve.