Rob MacFadyen's Q&A profile
Visual Studio Express Editions Conversion error: type string to date...need help
This is a simple application to display total years of the given date by giving one date manually using textbox control...but the conversion error occurs " Invalid conversion from type string to date ".... Public Class Form1 Dim date1 As Date Dim intMonths As Integer = 0 Dim intDays As Integer = 0 Dim intYears As Integer = 0 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click date1 = CDate (TextBox1.Text) -----------------------> ERROR Occurs her intYears = DateDiff(DateInterval.Year, date1, Now()) MessageBox.Show(intYears) End Sub End Class Hi, Date or Dat ...Show All
SQL Server Problem with Transaction Logs
Hi, I have a big problem with transaction log. I need to reduce the transaction log file becouse, the have 25 GB, but when i run the statement for BACKUP LOG with TUNCATE_ONLY, dont work, becouse i have database mirroring installed. Please is very urgent. You have to backup the transaction log. You can not issue a BACKUP LOG...WITH TRUNCATE_ONLY as this command is not compatible with Database Mirroring and as such is not allowed. I am concerned about your environment. Just because you have Database Mirroring enabled does not mean that you shouldn't be doing regular backups. Those backups should include transaction log backups. Then all you would to do is to shrink the tran log file. If you aren't doing transaction lo ...Show All
Visual Basic Setting MSSQL Entry as Variable in VB.NET
What I'm trying to do is select data out of a single cell in a MSSQL table using the SQL statement "SELECT JobData2 FROM tblJobs Where JobID=1" which will return a string and set that string as a variable within my VB.NET program the purpose of this is so that when all the MSSQL data is dumped and uploaded it will get uploaded in /home/variable/data/ on the FTP server anywhere heres the majority of the code any help would be much appreciated. Public Sub Work() 'GLOBAL VARIABLES FOR DATABASE DUMP AND FTP UPLOAD Dim dbserver As String = dbserverbox.Text Dim dbusername As String = dbusernamebox.Text Dim dbpassword As String = dbpasswordbox.Text Dim dbpath As String = dbpathbox.Text Dim ftpserver As String = f ...Show All
SQL Server New Install of Sql server Express fails to restore Master database
Hello, I have a fresh install of sqlExpress and Management Studio Express on my test server. I want to restore my master database from backup. From the command prompt I set the Sqlservr -s SQLEXPRESS -m Then I opened another comand prompt and ran my SQLCMD script to restore the Master Database. here is the sql script: RESTORE DATABASE [Master] FROM DISK = N'E:\COPLEYNEWSDATABASEBACKUP\Master.bak' WITH FILE = 1, MOVE N'mastlog' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Master_1.ldf', NOUNLOAD, STATS = 10 GO I recieve the following error. Msg 3154, Level 16, State 4, Server COPLEYNEWS\SQLEXPRESS, Line 1 The backup set holds a backup of a database other than the existing 'Master' dat abase. Msg 3013, Level 16, ...Show All
SQL Server How to create reference to shared data source in code
I need to create DataDrivenSubscription I found how to this but I have not found how to "Specify a shared data source" ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What happens next?
GSE has been out a whole day, so you should all be over your 'death march' by now , and ready to tell us what you are working on now! Seriously though, isn't it about time you spilled the beans as to what GSP will be all about, and perhaps gave us some idea of how frequent the release cycle is going to be for GSE We're actively planning future releases ... and some are on vacation. :) Stay tuned. We want to share as much as we can and get feedback as early as possible but we're not ready to do any bean spillage just yet. That reminds me, I'm on vacation. Paul ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ContentManager & Texture Loading Problems
Sorry if this may have been addressed, but I havn't been able to find anything about my particular problem. I am building a game development tool with XNA because I like its ease of use and it helps cut development time. I would like to be able to load a texture from any folder or network drive via the openfiledialog, but if I try something like : texture = content.Load<Texture2D>(openFileDialog_Main.FileName); I get an error: "error loading. file not found". I am still new to C# and XNA, so it could be a misunderstanding of how things are done. It would be great to be able to load textures like this as many artists keep their texture content in various locations. I am also trying the simpler method of : texture.fromFile(G ...Show All
Smart Device Development Extending Context menu for Windows mobile 5.0 Samrtphone Contacts
I have a Cab project which extends contact's contextmenu items. But When I installed the same cab file on smartphone it installed successfully but contextmenu items remains same Could there be any change in the installation file. this is my ini file to built the cab file [Version] Signature = "$Windows NT$" Provider = "MyProject" CESignature = "$Windows CE$" [CEStrings] AppName = "MyWireless" InstallDir = %CE1%\%AppName% [Strings] NOW_PPC_Dir = D:\Projects\MyOffice\OriginalPocketPC\ ...Show All
Smart Device Development Difference between SmartPhone and the PocketPC
What is the difference between the smartphone and the pocketPC Ok, so there are actually 4 types of devices under the Windows Mobile brand: - SmartPhone - Pocket PC - Pocket PC Phone Edition - Portable Media Center All of the device can be synchronized with data on your Windows PC (appointments, e-mail and contacts in Outlook, files ++) SmartPhones are basically advanced cell phones. Their main usage is making phone calls, but they also include applications like calendar, tasks, windows media player, solitaire ++. You can also connect the SmartPhone to the internet if you have a wireless data plan. This would allow you to do stuff like browse web pages and chat using instant messaging. SmartPhone Thoughts is a great ...Show All
Visual Studio 2008 (Pre-release) Show System.Windows.Forms.UserControl in XAML-Window
I try to show a (Custom) Forms.UserControl in a XAML-Window. The Control is in a external Project. Trying to show the UserControl in the XAML-Window generates the follow ArgumentException-Message: "Cannot add instance of type 'MyFormsUserControl' to a collection of type 'UIElementCollection'. Only items of type 'UIElement' are allowed." Is there a Way to use and show our CustomControls in a XAML-Window Code in XAML-Window: < Window x:Class = " Window1 " xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " xmlns:ccl = " clr-namespace:MyControls;assembly=MyControls " Title = " TestForm " Height = " 300 " Width = " 300 " > &l ...Show All
Visual Studio upgrade vb 2003 solution under source control from 2003 to 2005 in other source control db
Hi, I have a VB.NET 2003 solution under source control(VSS), that I want to update to 2005. Both VS2003 and VS 2005 are installed on my pc. I would like to keep the 2003 version in the 2003 vss db for a few months until I am certain that everything works in VS2005. I have several 3rd party .NET components that are not certain to be 100% compliant. My upgrade path would be: make an xcopy of the entire 2003 solution to a new folder start vs2003 , open the solution that was copied in the new folder in file/sourcesafe/change sourcesafe: unbind all projects and the solution from the VSS 2003 database. close VS2003 start VS2005, open the solution that was copied in the new folder follow the upgrade wizard to convert ...Show All
Visual Basic Fixture setup
Hey.. I need some help on developing a fixture list for a school games competition. The system has 36 pupils from 6 different classes and within the classes there are students in which are belonging to different houses (Yellow and Green). which would mean 18 participants from green house and 18 from yellow. The games that are played during the day are: ? Snap ? Cribbage ? Spillikins ? Junior Scrabble. The structure of the competition is as follows: ? the Yellow and Green Houses compete against each other in a series of matches ? each match is ‘best of three’ single games of one type of game ? pupils cannot play other pupils from the same class ? pupils can only play another pupil once ...Show All
SQL Server ProperCase() script to use in the dataflow
Does anyone have a nice script that can "Propercase" the values of a column in the dataflow. I was thinking of a Transform Script Task, with a Input and Output Column, which can be transformed. With Propercase i think: STEVEN SPIELBERG becomming Steven Spielberg Maybe also with some exceptions soo that "DELIVERY EU" stays "Delivery EU" you can use the following within a script to convert to proper case. Row.Name = StrConv(Row.Name, vbProperCase) You could setup some select case statements for exceptions... Frank ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Texture Surface Level
I am encountering problems sizing using the following code: textureA = TextureLoader.FromFile(device, filename); SurfaceA = textureA.GetSurfaceLevel(0); the file that I am using for textureA has dimensions of 549 x 710 yet the SurfaceA is coming up with dimensions of 1024 x 1024. What am I missing Thanks! wow. 60+ views and no one has a potential suggestion Ok, I've tried changing the texture to be rendered to to be a texture created in photoshop with an alpha channel. windowTexture = TextureLoader.FromFile(device, Path + WindowTextureTest, windowWidth, windowHeight, 1, Usage.RenderTarget , Format.A8R8G8B8 , Pool.Default, Filter.None, Filter.None, colorValue); I do... sprite.Be ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Individual mesh material transparency and reflection
I have a room, which is a mesh; it is made up of approx 100 materials. A few of these materials are glass windows. I would like to make materials which use a specific texture (glass) to be transparent (and, if possible, reflective). Any ideas on how to get started This is my render method which is called in the Direct3D render loop: public void Render() { for ( int i = 0; i < content.LobbySceneMaterials.Length; i++) { ExtendedMaterial material = content.LobbySceneMaterials ; string key = material.TextureFilename; if (! String .IsNullOrEmpty(key)) { // Set texture from content where filename matches. Texture texture = content.LobbySceneTextures[key]; device.SetTexture(0, texture); ...Show All
