mikesnp's Q&A profile
Windows Forms Strange behaviour of the stored procedure for SelectCommand
Hi, all! I've met a strange situation. I have a stored procedure: ALTER PROCEDURE dbo.GetTemp AS begin insert into dbo.log (ProcName) values('GetTemp') select * from TempDB end This procedure is set as SelectCommand property for TableAdapter. When the Fill method for this adapter is invoked, the DataGridView gets the data from, but nothing is added to the dbo.log table. When I start this procedure manually, everything works fine. What is the reason Is SelectCommand somehow prohibit any changes in DB Thank you in advance gqlu wrote: Hi, Try to set it as UpdateCommand property. SelectCommand will not change the database. Hope this helps. Does it mean I can't change tables other than one, for which I've created Tabl ...Show All
Windows Forms UserPreferenceChangedEventHandler
Here's my code, what am I missing Dim UserPref As New Microsoft.Win32.UserPreferenceChangedEventHandler( AddressOf HandlePrefChange) Public Sub New () InitializeComponent() UserPref. Don't know how to begin receiving events End Sub Private Sub HandlePrefChange( ByVal sender As Object , ByVal e As Microsoft.Win32.UserPreferenceChangedEventArgs) If e.Category = Microsoft.Win32.UserPreferenceCategory.Screensaver Then MsgBox( "Screensaver Settings Changed" ) End If End Sub All you should need is an AddHandler statement: AddHandler Microsoft.Win32.SystemEvents.UserPreferenceChanged, Me.UserPref Note that the documentatio ...Show All
Visual Basic using mmc object with basic to manipulate fsmgmt
hi, im trying to write a program that will open mmc, load fsmgmt (file server management), search all of the open files (local) listed for any instance of a specific file and close it. i have a script that will open mmc and load fsmgmt.msc, but i do not know what to do now. im running server 2003, mmc 2.0 and am scripting with visual basic 2005. i am not really good with basic, and am unfamiliar with the MMC object and how to use it. any help would be appreciated, thanks wraithzshadow this is what i have so far... Dim objApp As MMC20.Application objApp = New MMC20.Application objApp.Show() objApp.Load( "C:\windows\system32\fsmgmt.msc" ) it opens the file server management as it should, but i don ...Show All
Visual Basic Long Numbers
Hi, I would like to write applications, such as calculating pi, generating Mandelbrot Sets, factoring large numbers or prime hunts, which use extremely long numbers. I'm not talking about the measly 32 decimal places of the Decimal variable. I'm talking about two or three thousand decimal places. I've written a couple long number calculators which are, quite frankly, crude, cumbersome and slow. My approach has been to create arrays of byte characters, assign one digit to each byte, and then try to program the whole thing to handle addition, subtraction, multiplication and division; all the while trying to keep track of decimal places and polarities. It seems to me that there has to be a better way. Anyone know if it is possible to ...Show All
SQL Server I made a mistake about service name and the transmission queue got filled of them
I want to use SSB as a mean to thread multiple SP invocation of the same procedure. When I launched the initator processes it created in the transmission queue error messages saying for each of them that it is an invalid target service name. The view (sys.transmission_queue) records them in this way in the status column: "The target service name could not be found. Ensure that the service name is specified correctly and/or the routing information has been supplied." Services and queues and activation procedure are all defined into the same database. I drop services and queues, and i tried to create a service with the initial wrong name. Nothing happened. Thanks vour your help Thanks, I tried to ...Show All
Visual Studio Express Editions ToolTip
I know that adding a tooltip is not that difficult but for some reason its not working on my application. I have set the properties on the tooltip and the button that I want the tool tip to show on , and when I run my program at the time specified the cursor kind of flashes/blinks like its loading something, but nothing shows up... Am I missing something ToolTipOK.SetToolTip(ButtonLoginOK, "testing..." ) ...Show All
Visual Studio Team System Build Failed
Hello, i have tried to build after an import schema and I got build failed with this output ------ Build started: Project: GescomDatabase, Configuration: New Deployment Any CPU ------ Error: Project contains invalid objects. ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ========== How can I know where are invalid objects Luis - Objects that are invalid should be displaying with a red exclaimation (!) point in the Schema View. Depending on the type of object and the nature of the problem, you may find them in the Orphaned Objects folder in Schema View. When the parent of an object is missing or invalid, and we can't establish the dependency relationship, the item will end up under Orphane ...Show All
Visual Studio How can source control understand the changes on the file on database project and update it back to database?
I using a source control (Source safe) to manage database file. So after check out and check in one file. the file is a stored procedure on database(spAddDataItem). How can source control understand the changes on the file on database project and update it back to database ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Recommendations for terrainmesh collision and physics
I've been enjoying myself with XNAGSE for a while now, and wanted to start actually developing something real. So I started to play around with shaders a little, looking into terrain collision algorithms, but they all use a heightmap or a bytemap for terrains. What if I modeled something with Maya, loaded it in using the DirectX model content pipeline and wanted to use that as a level I searched around the Net, but haven't found anything that explains at least in understandable detail how to actually apply the algorithms to meshes themselves. Same goes for physics, a lot of info about the algorithms (Newton and Euler's laws etc.), but no real solid code as to how to do it in C#, let alone XNA. I'm sorry if this has ...Show All
Visual C++ __declspec(dllexport) required on function declaration in dll source code?
With the help of one of the people that posts messages on this website, I was able to get a C++ DLL to work with a VB 6.0 calling program. The function definition in the .cpp file has the __stdcall decoration on the function name, but it doesn't have the __declspec(dllexport) decoration on it. It seems to be working fine without it, but is it required for some reason If so what would that reason be Does the compiler put it in automatically when you compile it, or is it really required at all George See the other thread for a response: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1021013&SiteID=1 You can use summer@8 directly in VB because a function name cannot contain @. ...Show All
.NET Development Consume Web Services
Hi, I am new to the Xml web services.I created one web service on my machine and i tried to use it in another application in same machine. How can i invoke that method in my new application. Thanks sshaju Hi, when i gave the path of that web service to the web reference i am getting error message like There was an error downloading 'http://localhost:3080/WebSite41/Service.asmx'. Unable to connect to the remote server No connection could be made because the target machine actively refused it thanks ...Show All
Visual Studio Express Editions concerning media player
renee where do I post pause button code ok..so as I was saying I thought I would like to be able to make the current song repeat.....if you like a song you may wish to replay it a couple of times....... but the best I can do is this....which restarts the song, . if you catch it before the next song starts can you help Private Sub btback_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btback.Click WMP.Ctlcontrols.stop() tmr.Start() ProgressBar.Value = 0 btpause.Text = "pause" btpause.ForeColor = Color.Beige WMP.Ctlcontrols.play() End Sub ...Show All
Game Technologies: DirectX, XNA, XACT, etc. The HLSL Workshop from the SDK
I have worked with shaders before, but not very much. I want to delve into shader development, and thought the HLSL Workshop to be a good starting point. However, I don't know how to actually get the tutorial FX files to run. Here's what I've tried so far: Opening the FX files in the DirectX Viewer. The viewer wasn't able to load any of the files, and gave this error for each: "- Global parameter not found. Effect is not SAS-compliant." Making the BasicHLSL solution ( mentioned in the HLSL Workshop docs as a tutorial for debugging shaders ) use the tutorial FX files, and loading the skullocc.x file instead of Tiny. This cause a lot of runtime errors to be thrown when setting the values for the effect object. I'm sure th ...Show All
Windows Forms run time error (book1.xls) invalid attachament type but works when continuied
I have a vb app that creates a xls book1.xls and then sends an email and attaches book1.xls then goes and then goes to the next customer and drops book1 and creates a new book1. my problem is that during the run (200) customers i get an error at this point Dim oAttch As MailAttachment = New MailAttachment(sfile, MailEncoding.Base64) but i click continue and it still attaches book1.xls and will loop through 10-20-30 customers then pop the error again I press continue it my go to the end of the list or it may go 1 - and pop again then i click continue it attaches book1 and rusumes is there a way I can check for a specific error code error code -2147467259 and just tell it to contiinue can yo ...Show All
.NET Development IIS defult configure
Hi, I am a ASP.Net user, and with all of my stupidity I tried to change the IIS configre, didnt backed it up and now I cant find the "Defult" butten, I tried to remove it and add it again but it didnt restarted it. What shot i do Thank you all, Nadav Levintov. The forums at http://forums.iis.net might be better able to help. Thanks. ...Show All
