Search Results

Search found 5375 results on 215 pages for 'sqlserver 2005'.

Page 58/215 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • C++ template function specialization using TCHAR on Visual Studio 2005

    - by Eli
    I'm writing a logging class that uses a templatized operator<< function. I'm specializing the template function on wide-character string so that I can do some wide-to-narrow translation before writing the log message. I can't get TCHAR to work properly - it doesn't use the specialization. Ideas? Here's the pertinent code: // Log.h header class Log { public: template <typename T> Log& operator<<( const T& x ); template <typename T> Log& operator<<( const T* x ); template <typename T> Log& operator<<( const T*& x ); ... } template <typename T> Log& Log::operator<<( const T& input ) { printf("ref"); } template <typename T> Log& Log::operator<<( const T* input ) { printf("ptr"); } template <> Log& Log::operator<<( const std::wstring& input ); template <> Log& Log::operator<<( const wchar_t* input ); And the source file // Log.cpp template <> Log& Log::operator<<( const std::wstring& input ) { printf("wstring ref"); } template <> Log& Log::operator<<( const wchar_t* input ) { printf("wchar_t ptr"); } template <> Log& Log::operator<<( const TCHAR*& input ) { printf("tchar ptr ref"); } Now, I use the following test program to exercise these functions // main.cpp - test program int main() { Log log; log << "test 1"; log << L"test 2"; std::string test3( "test3" ); log << test3; std::wstring test4( L"test4" ); log << test4; TCHAR* test5 = L"test5"; log << test4; } Running the above tests reveals the following: // Test results ptr wchar_t ptr ref wstring ref ref Unfortunately, that's not quite right. I'd really like the last one to be "TCHAR", so that I can convert it. According to Visual Studio's debugger, the when I step in to the function being called in test 5, the type is wchar_t*& - but it's not calling the appropriate specialization. Ideas? I'm not sure if it's pertinent or not, but this is on a Windows CE 5.0 device.

    Read the article

  • Query joining in sql server 2005

    - by Domnic
    I have two queries like: SELECT PC_COMP_CODE, PC_SL_LDGR_CODE, PC_SL_ACNO ACCOUNT, COUNT(PC_CHEQUE_NO) CHQS, SUM(CONVERT(FLOAT, PC_AMOUNT)) CHQ_AMT FROM GLAS_PDC_CHEQUES WHERE PC_COMP_CODE = '1' AND PC_DISCD IS NULL GROUP BY PC_SL_LDGR_CODE, PC_SL_ACNO ,PC_COMP_CODE ORDER BY PC_SL_ACNO -------------------------------------------------- SELECT COAD_PTY_FULL_NAME,PC_COMP_CODE, PC_SL_LDGR_CODE, PC_SL_ACNO, PC_DEPT_NO, PC_DOC_TYPE, PC_CHEQUE_NO, PC_BANK_AC_NO FROM GLAS_PTY_ADDRESS,GLAS_SBLGR_MASTERS,GLAS_PDC_CHEQUES WHERE COAD_COMP_CODE = '1' AND SLMA_COMP_CODE = COAD_COMP_CODE AND SLMA_ADDR_ID = COAD_ADDR_ID AND SLMA_LDGRCTL_CODE = PC_SL_LDGR_CODE AND PC_COMP_CODE=SLMA_COMP_CODE AND SLMA_ACNO = PC_SL_ACNO AND SLMA_LDGRCTL_YEAR = DBO.GLAS_VALIDATIONS_GET_OPEN_YEAR(PC_COMP_CODE) If I execute first query alone I get 5 records... If I join the above two query like: SELECT PC_COMP_CODE, PC_SL_LDGR_CODE, PC_SL_ACNO ACCOUNT, COUNT(PC_CHEQUE_NO) CHQS, SUM(CONVERT(FLOAT, PC_AMOUNT)) CHQ_AMT, COAD_PTY_FULL_NAME FROM GLAS_PDC_CHEQUES LEFT OUTER JOIN GLAS_SBLGR_MASTERS ON( SLMA_COMP_CODE=PC_COMP_CODE AND SLMA_LDGRCTL_CODE = PC_SL_LDGR_CODE AND SLMA_ACNO = PC_SL_ACNO ) LEFT OUTER JOIN GLAS_PTY_ADDRESS ON( SLMA_COMP_CODE = COAD_COMP_CODE AND SLMA_ADDR_ID = COAD_ADDR_ID) WHERE PC_COMP_CODE = '1' AND PC_DISCD IS NULL AND SLMA_LDGRCTL_YEAR = DBO.GLAS_VALIDATIONS_GET_OPEN_YEAR(PC_COMP_CODE) GROUP BY PC_SL_LDGR_CODE, PC_SL_ACNO ,PC_COMP_CODE,COAD_PTY_FULL_NAME ORDER BY PC_SL_ACNO then I just get 2 records.... I need that 5 records to display after join..... How can I do it?

    Read the article

  • Unable to remove package from Delphi 2005

    - by Robo
    I needed to reinstall a package, DrRX.bpl. I removed it from the package list, and trying to install a newer version of the same package. I've replaced the old component's dir with the new one. When I open the new DrRX.bpl and click install, I get the error "Package C:\Program Files\Borland\BDS\3.0\components\rx work\output\DrRx.bpl cannot be installed because another package with the same basename is already loaded (DrRx.bpl)" I cannot find any reference to DrRX in my package list, DrRX does not appear in the Tool Palette. How do I locate where Delphi thinks this is installed, and remove it, so I can reinstall the package?

    Read the article

  • How to tell what account my webservice is running under in Visual Studio 2005

    - by John Galt
    I'm going a little nuts trying to understand the doc on impersonation and delegation and the question has come up what account my webservice is running under. I am logged as myDomainName\johna on my development workstation called JOHNXP. From Vstudio2005 I start my webservice via Debug and the wsdl page comes up in my browser. From Task Manager, I see the following while sitting at a breakpoint in my .asmx code: aspnet_wp.exe pid=1316 UserName=ASPNET devenv.exe pid=3304 UserName=johna The IIS Directory Security tab for the Virtual Directory that hosts my ws.asmx code has "Enable Anonymous access" UNCHECKED and has "Integrated Windows Authentication" CHECKED. So when the MSDN people state "you must configure the user account under which the server process runs", what would they be refering to in the case of my little webservice described above? I am quoting from: http://msdn.microsoft.com/en-us/library/aa302400.aspx Ultimately, I want this webservice of mine to impersonate whatever authenticated domain user browses through to an invoke of my webservice. My webservice in turn consumes another ASMX webservice on a different server (but same domain). I need this remote webservice to use the impersonated domain user credentials (not those of my webservice on JOHNXP). So its getting a little snarly for me to understand this and I see I am unclear about the account my web service uses. I think it is ASPNET in IIS 5.1 on WinXP but not sure.

    Read the article

  • SQL Server 2005: When copy table structure to other database "CONSTRAINT" keywords lost

    - by StreamT
    Snippet of original table: CREATE TABLE [dbo].[Batch]( [CustomerDepositMade] [money] NOT NULL CONSTRAINT [DF_Batch_CustomerDepositMade] DEFAULT (0) Snippet of copied table: CREATE TABLE [dbo].[Batch]( [CustomerDepositMade] [money] NOT NULL, Code for copy database: Server server = new Server(SourceSQLServer); Database database = server.Databases[SourceDatabase]; Transfer transfer = new Transfer(database); transfer.CopyAllObjects = true; transfer.CopySchema = true; transfer.CopyData = false; transfer.DropDestinationObjectsFirst = true; transfer.DestinationServer = DestinationSQLServer; transfer.CreateTargetDatabase = true; Database ddatabase = new Database(server, DestinationDatabase); ddatabase.Create(); transfer.DestinationDatabase = DestinationDatabase; transfer.Options.IncludeIfNotExists = true; transfer.TransferData();

    Read the article

  • Using Full-Text Search in SQL Server 2005 across multiple tables, columns

    - by crisgomez
    Hi, I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID(s) that satisfied of the supplied given value? User table Id Firstname Lastname Middlename Email AlternativeEmail 154 Gregorio Honasan Pimentel [email protected] [email protected] 156 Qwerty Qazggf fgfgf [email protected]. [email protected] 184 Xandrick Flores NULL [email protected] null Certification table Id AID Certification School 12 184 sdssd AMA 13 43 web-based and framework 2 Asian development foundation college 16 184 hjhjhj STI 17 184 rrrer PUP 18 154 vbvbv AMA SELECT DISTINCT Users.Id FROM Users INNER JOIN Certification on Users.Id=Certification.aid LEFT JOIN FREETEXTTABLE (Users,(Firstname,Middlename,Lastname,Email,AlternativeEmail), 'xandrick' )as ftUsr ON Users.Id=ftUsr.[KEY] LEFT JOIN FREETEXTTABLE (Certification,(Certification,School), 'xandrick' )as ftCert ON Certification.Id=ftCert.[KEY]

    Read the article

  • Hidden Features of Visual Studio (2005-2008)?

    - by shoosh
    VS is such a massively big product that even after years of working with it I sometimes stumble upon a new/better way to do things or things I didn't even know were possible. For instance- Crtl-R,Ctrl-W - show white spaces. essential for editing python build scripts. Under "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor" Create a String called Guides with the value "RGB(255,0,0), 80" to have a red line at column 80 in the text editor. What other hidden features have you stumbled upon?

    Read the article

  • SQL Server 2005 - Building a WHERE clause

    - by user336786
    Hello, I have a stored procedure that is dynamically building a query. The where clause associated with this query is based on filter values selected by a user. No matter what I do though, the where clause does not seem to get set. -- Dynamically build the WHERE clause based on the filters DECLARE @whereClause as nvarchar(1024) IF (@hasSpouse > -1) BEGIN IF (@hasSpouse = 0) SET @whereClause='p.[HasSpouse]=0' ELSE SET @whereClause='(p.[HasSpouse]=1 OR p.[HasSpouse] IS NULL)' END -- Dynamically add the next filter if necessary IF (@isVegan > -1) BEGIN IF (LEN(@whereClause) > 0) BEGIN SET @whereClause = @whereClause + ' AND ' END IF (@isVegan = 0) SET @whereClause = @whereClause + 'c.[IsVegan]=0' ELSE SET @whereClause = @whereClause + '(c.[IsVegan]=1 OR c.[IsVegan] IS NULL)' END PRINT @whereClause The @whereClause never prints anything. In turn, the LEN(@whereClause) is always NULL. The @isVegan and @hasSpouse values are passed into the stored procedure. The values are what I expected. What am I doing wrong? Why is the @whereClause never being set? Thank you for your help! Thank you!

    Read the article

  • Implement Partial sorted query in sql server 2005

    - by Brij
    I have to show records in such a way that some selected records should come first. After this, another records come in sorted manner from the same table. For example, If I select state having stateID = 5 then the corresponding record should come first. after this another records should come in sorted manner. For this, I tried union but it shows all in sorted. select state from statemaster where stateid=5 union all select state from statemaster where not stateid =5 order by state Thanks

    Read the article

  • Drawbacks of Dynamic Query in Sqlserver 2005 ?

    - by KuldipMCA
    I have using the many dynamic Query in my database for the procedures because my filter is not fix so i have taken @filter as parameter and pass in the procedure. Declare @query as varchar(8000) Declare @Filter as varchar(1000) set @query = 'Select * from Person.Address where 1=1 and ' + @Filter exec(@query) Like that my filter contain any Field from the table for comparison. It will affect my performance or not ? is there any alternate way to achieve this type of things

    Read the article

  • Database schema publishing with SQL Server 2005/2008

    - by Marconline
    Hi everybody, I've a question for you. We have built a software that has a single database for each customer. These databases are managed by SQL Server 2008. Now the problem is that when we build our software we, sometimes, need to change something on the schema (like adding table, modifying existing ones etc) and migrate these updates on all the customers' databases. Now this task is accomplished by hand: we generate update scripts and then, using T-SQL, we update each database. This is ok for a small set of customer, but we are now becoming bigger and bigger and we really don't know how to face it. We found Wizardby and it seems interesting, but quite difficult for us to learn in this exact moment. Do you have any other trick? Thanks a lot, Marco

    Read the article

  • T-SQL Hierarchy to duplicate Dependent Objects tree view in SQL Server 2005

    - by drewg
    Hi Id like to map the calling stack from one master stored procedure through its hundreds of siblings. i can see it in the dialog, but cannot copy or print it, but couldnt trap anythiing worthwhile in proflier. do you know what sproc fills that treeview? i must be a recursive CTE that reads syscomments or information_schema.routines, but its beyond my chops, though i can imagine it thanks in advance drew

    Read the article

  • Datetime problem in VB 2005

    - by haythamhamdy
    I am using VB2005 and SQL SERVER 2000. PVAR_SQL_STR = "INSERT INTO GLR_US_PERIOD (ORG5_CODE,PERIOD_YEAR,PERIOD_CODE,PERIOD_NO,FROM_DATE,TO_DATE,INSERT_USER,INSERT_DATE) VALUES " _ & "('" & PVAR_COMPANY_CODE & "' ,'" & TextBox1.Text & "','" & Serial1.Text & "'," & TextBox2.Text & ", '" + DateTimePicker1.Value.ToString("D") + "' ,'" + DateTimePicker2.Value.ToString("D") + "','" & PVAR_USER_CODE & "','" + Now.ToString("F") + "')" Syntax error converting datetime from character string because of this part only: Now.ToString("F") Why, I do not know but when I change into Now.ToString("D") it works well but it saves the date only. I want to insert date and time.

    Read the article

  • Ajax not working in visual studio 2005

    - by sachin
    I am trying to do an ajax website, but my ajax is not working. I checked my GAC and system.web,extensions dll is available. Why it is not working .? I am also not getting any errors. I tried many ways. I wrote the below code to test ajax. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </cc1:ToolkitScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1"> </cc1:CalendarExtender> </div> </form> </body> </html> JAvascript error that i got 1.Type is not defined http://localhost:1467/testnew/Default.aspx?_TSM_HiddenField_=ToolkitScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.20229.20821%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3ac5c982cc-4942-4683-9b48-c2c58277700f%3ae2e86ef9%3aa9a7729d%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a4c9865be%3aba594826%3a507fcf1b%3ac7a4182e

    Read the article

  • C# code analysis - VS 2005

    - by anon
    I have a C# user control project which causes intermittent .NET run time error, a generic error, and wondering if there is any code analysis tool that I can point at my .sln file which would tell me what may be causing my error

    Read the article

  • Storing images in a Microsoft SQL Server 2005 database

    - by Rekreativc
    Hello! I have a question about storing an image in a database. I know this topic has been discussed before, however I feel that in my case this is actually a good idea - the images will be small (none should be as large as 1MB) and there shouldn't be too many. I like the idea of not worrying about IO permissions etc. Anyway I have a problem when storing the image (byte[]) to the database type image. Here is my code: OleDbCommand comm = new OleDbCommand(strSql, Program.GetConnection()); comm.Parameters.Add("?", SqlDbType.Image).Value = bytearr; comm.ExecuteNonQuery(); Everything compiles fine, however when I run it, the code only saves the value 63 (0x3F) into the field - no matter which image I am trying to save. What could be the problem? Thank you for your help.

    Read the article

  • How Serializable works with insert in SQL Server 2005

    - by Spence
    G'day I think I have a misunderstanding of serializable. I have two tables (data, transaction) which I insert information into in a serializable transaction (either they are both in, or both out, but not in limbo). SET TRANSACTION ISOLATION LEVEL SERIALIZABLE BEGIN TRANSACTION INSERT INTO dbo.data (ID, data) VALUES (@Id, data) INSERT INTO dbo.transactions(ID, info) VALUES (@ID, @info) COMMIT TRANSACTION I have a reconcile query which checks the data table for entries where there is no transaction at read committed isolation level. INSERT INTO reconciles (ReconcileID, DataID) SELECT Reconcile = @ReconcileID, ID FROM Data WHERE NOT EXISTS (SELECT 1 FROM TRANSACTIONS WHERE data.id = transactions.id) Note that the ID is actually a composite (2 column) key, so I can't use a NOT IN operator My understanding was that the second query would exclude any values written into data without their transaction as this insert was happening at serializable and the read was occurring at read committed. I have evidence that reconcile is picking up entries

    Read the article

  • Microsoft SQL Server 2005 Function, passing list of start and end times

    - by Kevin
    I'd like to do had a dynamic number of one start/end time pairs passed to a function as an input parameter. The function would then use the list instead of just one start, and one end time in a select statement. CREATE FUNCTION [dbo].[GetData] ( @StartTime datetime, @EndTime datetime ) RETURNS int AS BEGIN SELECT @EndTime = CASE WHEN @EndTime > CURRENT_TIMESTAMP THEN CURRENT_TIMESTAMP ELSE @EndTime END DECLARE @TempStates TABLE (StartTime datetime NOT NULL , EndTime datetime NOT NULL , StateIdentity int NOT NULL ) INSERT INTO @TempStates SELECT StartTime , EndTime , StateIdentity FROM State WHERE StartTime <= @EndTime AND EndTime >= @StartTime RETURN 0 END

    Read the article

  • Visual Studio (2005 & 2008) Compile Completed Alert?

    - by Paul
    Does anyone know of any kind of plugin or alert system which will let me know when my compiles are completed? Some of the solutions I work with are gigantic and sometimes the compiles can take 5-20 minutes (depending on the PC). Thus I would like to do something else in the meantime, but I don't want to keep checking back to see if the compile is done. Is there any way to have a windows alert, or flash the screen when the compile is done? It would let me browse the internet whilst waiting for the compile to finish without worrying that its been complete and I'm just wasting time.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >