C2_CHS's Q&A profile
SQL Server Access functions to SQL Server
I'm upsizing MS-Access to SQL Server 2005. I need to convert the following functions: TRANSFORM PIVOT FORMAT MID Are there any similar functions in SQL Server Also I have a query as follows: SELECT Mid$ ([AccountNumber], 3 , 8 ) AS [Account#], Format ([checkamount]* 100 , "000000000" ) AS Amount, IIf ( IsNull ([statusdate]), " " , Format ([statusdate], "yyyymmdd" )) AS [Date] FROM tblResult; How do I convert this in SQL Server query Please check out the following resources for migrating from Access to SQL Server. We also have a tool to help with that. http://www.microsoft.com/sql/solutions/migration/access/defaul ...Show All
.NET Development How to Serialize This ?
Hello all, I need help to serialize a HashTable that contains instance objects of this class: [Serializable] public class Test{ private string _test1; private int _test2; private XmlDocument _test3; // Class Properties public string Test1 { get {return _test1;} set { _test1 = value;} } etc... } public class MainClass{ private Hashtable _objs; private Test _testobj; // Properties etc... public MainClass() { Objs = new Hashtable(); Testobj = new Test(); Objs.add(Testobj.Test2,Testobj); } etc.. } So said this, I need to serialize the Hashtable Objs. The issue is that I dont know how to do it because of the XmlDocument object of the Test class. Could you show me how to do it Thank you for your tim ...Show All
SQL Server MFC/SQL Server 8 + ODBC problems
Hi. I get the feeling ive probably not understood something fundamental but im having issues with using CRecordSet / ODBC from MFC to access data in an SQL server 8 database. I open the database without any problems using a DSN for SQL native client. THis opens fine and is updateable. I then get a record set out using the dynaset flag. This is where the problem occurs. If i use dynaset then the record is not updateable. If I use the cursorlib for the database, then it doesnt support dynaset anyway. Now, the question is - should i be using dynaset anyway I am trying to develop a multi-user database application. THe problem im looking at is I have a customer records screen. If 2 users both look at the record, they both try to update t ...Show All
Visual Studio Express Editions Error while generating multiple forms
Hello again, I am trying to create a simple text editor. In this editor, I have an MDIParent form that I created. In the MDIParent, I want to create a form that has a multiline text box in it. Here is the code that I have created so far: Imports System.windows.Forms Public Class Startpage Private Note As New System.Windows.Forms.TextBox Private Notes As New System.Windows.Forms.Form Private m_NotesNumber As Integer = 0 Private save As New System.Windows.Forms.SaveFileDialog Private Sub NewToolStripMenuItem_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click m_NotesNumber += 1 Note.Multiline = True Note.Parent = Notes No ...Show All
Visual Basic drawing on forms
VB 5 had tools to draw lines and shapes on forms in design mode. I don't see those in Visual studio 2005. Am I missing something I know you can code them, but how do you draw them directly on the form I think they left those out, simply because it's now so incredibly easy to make that type of control yourself. Just have a look at how to paint with Graphics and you'll be hooked on drawing everything yourself, instead of using prefabricated controls. ...Show All
Visual Studio Team System Unit Testing the new Database Unit Test Code
We're working through creating our own unit test for comparing multiple result sets. I got sick of running the gacutil after every edit & build so I decided to create a unit test to test the code. HELP! I've figured out that I need to call my test through something like this: MyTest mTest = new MyTest(); Sqlconnection mcon = new SqlConnection("connectstring"); mcon.Open(); DatabaseTestAction ta = new DatabaseTestAction(); ta.SqlScript = "EXEC spr_SomeQuery 'value'" ConnectionContext scriptcon = new ConnectionContext(); scriptcon.Connection = mcon; MyTest.Assert(mcon, ts.Execute(scriptcon,scriptcon,ta,xparams)); But I get the error "The provider factory cannot be null" I'm clearly mi ...Show All
Visual Studio Javascript Debugging With IE7
Hello, I have ran across an issue debugging an ASP.Net page after installing IE7 on my development machine and I have not been able to find a solution. I am using Visual Studio 2003 and I am no longer able to access the rendered source (including embedded javascript which is emitted in the code behind) using Debug -> Windows ->Running Documents -> Page.aspx When I click on the running page in the Running Documents , all that displays is the source page and not the page that is running in the browser. Doing these same steps in IE6 worked fine. Also, note that the debugger statement does break but only shows the source page (not the running page) in Visual Studio and places the break at the end of the </html> tag. Therefor ...Show All
Visual Studio Express Editions is there a add-on "reportview" that can be use in VB Express?
is there a add-on "reportview" that can be use in VB Express What exactly are you trying to do Create a report in access and then show it in a form using VB Express If you are working with access then you can do reports in access. Access has (VBA) Visual Basic for Applications. ...Show All
.NET Development Problem in calling .vbs file and getting output
I am using System.Diagnostics. Process class to call a vbs file and want to get out put from that file(whatever it echo on standard output) from a code behind of an asp.net 2.0 application. Code is: System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = this.Page.MapPath(this.ResolveUrl("Script/ALI.vbs")); p.StartInfo.UseShellExecute = true; p.StartInfo.RedirectStandardOutput = true; p.Start(); p.WaitForExit(); System.IO.StreamReader sr = p.StandardOutput; txtComments.Text = sr.ReadToEnd(); Now the problem in above code is that if I set UseShellExecute = false , it says on executing Start() that its not a win32 application. OK if I set UseShellExecu ...Show All
Game Technologies: DirectX, XNA, XACT, etc. World to screen coordinates?
To cut a long story short, I need to obtain the screen position of a point that has been transformed by the view and projection matrices. My vector math is pretty rusty, and I am not sure how exactly to go about it. Could anyone give me a hand After you have transformed a coordinate by the WorldViewProjection matrix, you should divide by the .w coordinate. The x/y coordinates will be in [-1, 1], with the positive Y axis pointing up. You'll need to flip the Y axis (the positive Y screen axis points down), scale by .5, add .5 to both the x/y coordinates, then scale by the screen size. You can adapt this effect code to work in your C# code if necessary: float4 projectedPosition = mul(position, WorldViewProjec ...Show All
Visual C# Trying to execute Batch files from a C# application
Hello all, I am trying to exectute a simple batch file from a C# application and I am running into some trouble. Basically, my code compiles fine, but when I run it, the batch file is never executed. I am simply trying to run a code sample that I received from another website and I am curious to know if this is a coding or machine related issue. Your thoughts would be most appreciated. Here is the code snippet: using System; using System.Text; using System.Diagnostics; namespace CallBatchFile { class Program { static void Main( string [] args) { Process p = new Process(); try { string targetDir; tar ...Show All
Smart Device Development Error in Accessing IIS Server.
Hi all, Iam using a PDA which transfers the data from the PDA to the local system using ActiveSync. Iam able to browse the Internet using this PDA. Iam not able to access the Local IIS Server of the Desktop to which this device is connected. for Example: I have a Windows XP System and a PDA(BIP 3010). I have connected this PDA to this XP PC using an Cradle and active sync 4.0. i want this pda to browse the Local host which have some web services. can anyone tell me how should i browse those pages in the local PC Thanks in advance Biju S Melayil Hi Rauhan i have specified the IP Address rather than the localhost. I am trying to access it as Http://192.168.1.7/app/appname.aspx but its not working C ...Show All
Visual Studio How to pass Report parameter in ReportViewer Control
Hello Friends, I am using VS2005. how to pass the Report parameter in the reportviewer control I am using ther Remote mode for the report. till now i know that i can set the parameter is using the bellow method. This SetParamters method only accept the parameter like Microsoft.Reporting.WinForms.ReportParameter type. this .reportViewer1.ServerReport.SetParameters(). But can't findout how to pass that parameter in the method. please help me. Nilay A small correction... Dim objParameter As ReportParameter zobjParameter = New ReportParameter(strParamName, strParamValue) Me.objReportViewer.ServerReport.SetParameters(zobjParameter) Alejandro. ...Show All
Visual Studio ReportViewer.ServerReport passing parameters as non-strings
Winforms, C#, report created on RS2005 I am using the following code to try to load a report from reporting service 2005 to a winform reportviewer. Problem is the report takes datetime and int values as parms. The ReportParameter only allows strings. How can I pass a datetime and int parm values reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms. ProcessingMode .Remote; reportViewer1.ServerReport.ReportServerUrl = new Uri ( ConfigurationSettings .AppSettings[ "ReportServerEndPoint" ]); reportViewer1.ServerReport.ReportPath = "report path" ; DateTime dtPayPeriod = Convert .ToDateTime(txtPayEndDate.Text); int fromDept = Convert .ToInt32(txtFromDept.Text); int toDept = Con ...Show All
Windows Forms Setup Project: Execute vsi file inside the msi
I assume the title says it all but anyway; I am creating a setup project and adds my exe's and dll's to that project. I now want that, as part of the installation, a vsi file should be executed. How do I indicate that in the setup project Niels Would it be possible for me to get this information as well I am trying to setup a way to manage custom code snippets and install them via a .vsi file within one of my projects when the framework is deployed to developers workstations. ...Show All
