Topics
-
- 0 replies
- 2.3k views
I have a stored proc something like this: Create proc AddAgent @param1 varchar(20), @param2 varchar(30) As Declare @Message varchar(200) �. Set @Message = �Some text� Return @Message When I call this proc from vb.net 2005 it returns an error saying: "Conversion failed when converting the varchar value 'Some text' to data type int." Any ideas? My guess is that it has something to do with the return statement In VB the syntax for the parameter is the following: Dim pMessage As New SqlParameter() pMessage.ParameterName = "@Message" pMessage.Direction = ParameterDirection.ReturnValue pMessage.SqlDbType = SqlDbType.VarChar pMess…
Last reply by Puiu, -
- 9 replies
- 2.3k views
been searching but i still couldnt find any samples for adding a radiobutton control in a table control, anyone?
Last reply by lamy, -
- 2 replies
- 1k views
This doesnt seem that hard but i'm drawing blank.. In my whatever.aspx, i have a hidden button. In the code behind, I have a javascript string like this; dim myScript as string = "<script language=javascript>" & _ " if confirm('question?') == true { " & _ "[b] I want to click that hidden button [/b] "}" & _ " </script>" How do I click a button in Javascript?
Last reply by lamy, -
- 1 reply
- 1.4k views
i'm trying to create a custo section in my app.config file, this is my config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="myCustomSection" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> <myCustomSection> <add key="Test" value="Testing" /> </myCustomSection> </configuration> this is my code: NameValueCollection nvc = new NameValueCollection(); nvc = ((NameValueCollection) ConfigurationSettings.GetConfig("myCustom…
Last reply by OMID SOFT, -
- 1 reply
- 1.1k views
I've been trying to find out how to change a specific cell within a specific row in a datatable using VB.Net Is anyone able to help with a code snippet Simon
Last reply by OMID SOFT, -
- 1 reply
- 1.4k views
Can someone show me how to directly add a text file into a database using SQL Server 2000. It is my understanding that I need to use a image field. I am unsure how to do this. The file is very large, and do to political constaints I cannot store a file location instead. I would also be open to storing the contents of the file in a memo field, but SQL Server returns an error saying the data will get truncated. I will also need to know how to retrieve it too.
Last reply by Igor Sukhov, -
- 3 replies
- 8k views
Hello everyone, I'm writing a engine in C# using Visual Studio 2005 (.NET 2.0). Right now I am using QueryPerformanceCounter(). I'm not sure exactly how to calculate FPS with QueryPerformanceCounter, but I know how with timeGetTime. Here is my code for timegettime: public struct FPSManager { public int fps; public int CurrentTime; public int LastTime; public int frames; } public void MainLoop() { while (GameLoop) { fps.CurrentTime = timeGetTime(); fps.frames++; Application.DoEvents(); if (fps.CurrentTime - fps.LastTime >= …
Last reply by Nate Bross, -
-
- Administrators
- 4 replies
- 1.1k views
Is there anyway of getting the Server Data and Time via ASP.Net for example Request.ServerVariables("Date_Time")? Many Thanks
Last reply by cjhammer2004, -
-
- 8 replies
- 3k views
Hi all, Was messing around with the .mp3's that I have on my machine, and was thinking that it would be pretty cool if I had a web service set-up on my machine that would allow me to select a song and play it on the computer/server using a pda to select the particular song. Now such a web service would only be usefull for myself at home, but it would allow me to sit in one room at home, and use the web service to change the song playing on the server in another room. I have been unable to find any information on the possibility of getting the functions for playing a song for a web service, I did come across some very nice functions for a windows application. I w…
Last reply by tmack, -
-
- Leaders
- 3 replies
- 1.7k views
I was wondering how to make a program automatically do a fast user switch. What i want is something that will go off and switch user after a certain time.
Last reply by snarfblam, -
-
- 3 replies
- 5k views
For starters it's a good idea to understand the definition of a String in the land of Microsoft and .NET. - Microsoft Developer Network What this roughly means is that every time you write code like this 'I am using VB because it formats the best in this forum. Dim MyString as String = "" For i as Integer = 0 to 99999 MyString &= "x" Next i the OS has to re-allocate memory for the string 100,000 times, this is very inefficient. Don't despair, there is hope we have the System.Text namespace, which includes the StringBuilder class. - Microsoft Developer Network This means the same code as above (slightly altered) 'I…
Last reply by IngisKahn, -
-
- *Experts*
- 0 replies
- 1.9k views
I'm trying to find some help on the video game "Trackmania Sunrise". If you're not familiar, it's a great little racing game with an arcade feel. You can't go onto the next track until you beat the previous. There's one we're stuck on (me and my son) called "Goal!". I've tried googling but can't find anything to help. I also tried gamefaqs.com but they didn't have any help. The game's website even has community links, but I couldn't find where any of the sites have help. Although it's a racing game, there's a mode called "Platform" which more of a puzzle. We're totally stuck! He's only 4 and yet he's beat almost every level by himself. But this one he can't get past…
Last reply by Nerseus, -
-
I have a hashtable where I have added something into it. hastht.Add(no, new object[2]{class, command} IDictionaryEnumerator myEnumerator = cmdqueue.GetEnumerator(); myEnumerator.MoveNext(); _key = myEnumerator.Key; _value = myEnumerator.Value; The _value contains class and command that I wish to get, but if I try object[] xxx = (object[])_value; I get the error that the cast is invalid. How do I solve this !
Last reply by PlausiblyDamp, -
- 0 replies
- 1.4k views
I only know of one and I'd like to know of more. It would be cool if we could get a list of controls/libraries that are free for non-profit use and also free for any use. Power Collections Really gets some good features added to collections. I've been using the Bag Collection for a little while on a project. It uses a Generic Type and has all the methods I've needed - compared to the standard .Net collections where you might have to make some custom methods. I'd like to see controls for 2.0 that do what .Net controls out of the box don't. In particular I'd be looking for a Flexgrid type - a datagridview (the new one) with support for more controls - ListView with …
Last reply by Denaes, -
-
- Administrators
- 2 replies
- 4.5k views
Using Visual Studio 2005, VB The error BC30456 seems to be a regular occurrence with my asp.net sites, all im trying to do is to change the title of the asp.net page in Visual Basic on the Page_Load() Function: Line 7: Protected Sub page_load() Line 8: Me.Title = "Forums" Line 10: End Sub This works fine when running on the Developer web server within Visual Studio but when i publish it to my win2003 server i get the following error: ______________________ Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify …
Last reply by cjhammer2004, -
-
- 1 reply
- 1.1k views
Hi, this is my first post in this forum. And I hope you help me. I am trying to make a subclass from my custom web control. But wherever the definition of the subclass occures, it fires parent's Page_Load without initializing components, and that causes the parent to throw a NullReferenceException, because all controls are not initialized. ny one have ideas on solving this problem?
Last reply by bri189a, -
- 0 replies
- 831 views
I am trying to provide a button for a user to click and then they download a file from my web page. The problem I am having with this code is that it sends the file to user, but at the end of the file is tacked on the html of the page itself. How can I get rid of that part at the end? http://www.ondotnet.com/pub/a/dotnet/2002/04/01/asp.html The important part of the code is as follows: string filename = Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition",@"attachment; filename=" + filename + ""); Response.Flush(); Response.WriteFile(filepath);
Last reply by VBAHole22, -
- 2 replies
- 857 views
As anybody that reads all threads will know I recently decided to build a food calculator. This application has two main collection in it, a collection of recipes and a collection of consumables. The app currently consists of 3 forms. MainForm AddConsumableForm AddRecipeForm My question is, would it be better to store the collections in a public static class that would be accessible from all forms, or would it be better to pass a reference to the AddForms whenever they are Shown?
Last reply by Cags, -
- 4 replies
- 1.5k views
Hi, I've just started working on an application to help me easily work out nutritional information about the foods I am eating in a day. I've come up with a basic data structure and just wondered if anybody had any input on the solution I have currently come up with. public struct Nutrition { public int Fat, Protein, Carbs, Calories; public Nutrition(int myFat, int myProtein, int myCarbs, int myCalories) { Fat = myFat; Protein = myProtein; Carbs = myCarbs; Calories = myCalories; } } public class Consumable { private Nutrition _nutritionInfo; private string _name; public Nutrition NutritionInfo { get { return _nutritionInfo; } } public string Name { get { r…
Last reply by Cags, -
- 0 replies
- 803 views
I've built a contrôle inheriting from Panel and associated with a ParentControlDesigner. I would like to force the SnapToGrid property using the PrefilterProperties method (shadowing it if possible from the properties browser). Thank you for your help
Last reply by c3b12,
-
Who's Online 0 Members, 0 Anonymous, 54 Guests (See full list)
- There are no registered users currently online