JaBaVe's Q&A profile
.NET Development newbie: easy question about JS from .aspx
Hi everyone, I'm just an ASP.Net newbie. I'd like to know how to call a .JS file from my aspx page. In ancient times I did this in my asp pages: <!-- #include file="./includ.... TIA, Enric.... Do you want just to include the js in your page or actually you want to call a function from this js To include it you have to do this: <script type="text/javascript" src="/JS/MyJs.js" /> To use functions from there you just create another script in where you make a call to any of those functions. Hope it helps Rgds Rodrigo ...Show All
Visual Basic Streamwriter in VB 2005
This SHOULD be easy. I must be missing something. I'm assembling a long string and trying to write it out to a file. If I display it in a message box or textbox, it looks fine. But when I write it out to a file, it gets chopped off. I thought it might be my data, because it is supposed to be HTML, but it seems to be related to the amount of data, because it chops off at about the same number of lines no matter what the data. I tried breaking it into smaller strings and doing two writelines, but it still does the same thing. lname = names(1) outFile = "D:\Class of 57\updatehtm\" & lname & ".htm" output = New FileStream(outFile, FileMode.OpenOrCreate, FileAccess.Write) fileWriter = New StreamWriter(outp ...Show All
Visual Studio Team System Interface Property Declaration generates error
When implementing a property on an interface (in VB) FxCop 1.35 reports a breaking error: CA1275 ParameterNamesShouldMatchBaseDeclaration "Change parameter name 'value' of method ChannelInfo.set_BlockSize(Int32):Void to 'Value' in order to match the identifier as it has been declared in IChannelInfo.set_BlockSize(Int32):Void" I would expect that the casing should be lowercase instead of upper case (although it doesn't generate an error if the casing is upper case). So which is correct There are similar issues I've seen reported, and this should be corrected in version 1.36 This is a known issue and will be fixed in the next version of FxCop/Visual Studio. Users never actually see the name of the 'value ...Show All
Visual Studio Team System Data Compare - Next Button Grayed Out
Trying to a Data Compare. After I select my 2 data sources, I go to the next screen where I select the tables/views. I can select all tables or select individual tables, but no matter what I do the Next button is grayed out. Clicking the Finish button just closes the wizard without doing anything. What am I doing wrong I am running the initial CTP that was distributed at Tech Ed. Do you the tables you are comparing have a primary key constraint or an unique index present If not we can not compare the data, because there is no order in which we can compare the rows between the two tables or views. -GertD "DataDude" Development Manager ...Show All
Game Technologies: DirectX, XNA, XACT, etc. BasicEffect, adding a texture and redering it.
I'm trying to add a texture to a cube using the built-in BasicEffect class. Can't seem to get the BasicEffect technique to render the texture. How does one set the BasicEffect technique to allow rendering the texture Here is the cube set-up: public static VertexPositionNormalTexture[] MakeCube() { VertexPositionNormalTexture[] nonIndexedCube = new VertexPositionNormalTexture[36]; Vector3 topLeftFront = new Vector3(-0.5f, 0.5f, 0.5f); Vector3 bottomLeftFront = new Vector3(-0.5f, -0.5f, 0.5f); Vector3 topRightFront = new Vector3(0.5f, 0.5f, 0.5f); Vector3 bottomRightFront = new Vector3(0.5f, -0.5f, 0.5f); Vector3 topLeftBack = new Vector3(-0.5f, 0.5f, -0.5f); Vector3 topRightBack = new Vect ...Show All
Visual Basic Saving TreeView Changes to Database
Hi all, I have a treeview control in a VB.NET 2005 form that shows item category/subcategory, so root elements are all categories and child elements are all subcategories. I pull the data off the database using code (no wizards), actually from two different tables. The user can add/change categories and subcategories. No deletions are allowed, user can only mark them inactive. To tie the categories to the subcategories I use a relationship between the two tables of the Access DB. That all works perfect. My question is on how should I save the changes back to the two tables. What would a good practice be I thought I could delete both tables (categories and subcategories) and traverse the treeview to save record by record but I do ...Show All
SQL Server Where is the database selection dropdown in Management Studio?
Hi, I am a long time user of Sybase and SQL Server 2000, and have been trying to get used to the new Management Studio for the past few months. I have found many situations where I ended up in the wrong database, almost ending up deleting production data, etc. At this point, I am back to pasting temporary "use DB" clauses in my edit window just make sure that I am in the right place. Where is the eqivalent of the sql server 2000 database selection dropdown Also, how can I display the current database on the screen All I see now is the tab showing abreviated file and db, that I constantly have to mouse-over to see. It looks something like "DB........test.sql" thanks hi ...Show All
Visual Studio Forcing a clean build - especially for Unit test DLL's
G'day, On of the problems I'm finding frustrating to resolve is how to do the equivelant of the /clean project command in the GUI build process. "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Devenv.exe" /Clean /project UnitTest C:\Data\Customers\xyz\Development\TheSolution.sln I know there is a Solution explorer right click option to "clean". But I really want to be able to switch that on perminantly for a project, so I can just build/debug it an know that all the latest files are being used. This seem particularly critical for Unit test DLL's for instance. I've had a snoop around the Pre-Build Events for Visual Basic solutions, but the help doesn't seem to give enough examples for me to work out ...Show All
Visual C++ CreateProcess VS2005
First id like to say i apologise for the repeat post on this topic ive seen quite a few about create process. However ive come accross a problem i havn't seen addressed before... The example works in msdn help... but im having some trouble using a variable.. ill explain... heres the working one... LPTSTR szCmdline=_tcsdup(TEXT("cgi.exe")); now the main problem is getting a variable in place there... ive tried a few things.. one being string cgi="cgi.exe"; LPTSTR szCmdline=(LPTSTR)cgi.c_str(); CreateProcess(NULL, szCmdline, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInformation); The other problem is i need to get the file to load outside the directory of the parent process... which i cant get to wor ...Show All
SQL Server Duplicate columns in a select clause plus order by statment
Hi All, I am working on a Java project that uses SQL server. The database is accessed through a ORM tool, so I do not have direct access to the generated SQL. My problem is that on SQL Server 2000 the following clause worked : SELECT stock_item_code, supplier_cost_number, amended_by, amended_date, lead_time, pack_cost_currency, pack_size, stock_item_code, supplier_number, supplier_reference FROM supplier_cost WHERE stock_item_code = 1000010001 and supplier_number = 1 ORDER BY stock_item_code, supplier_cost_number However on SQL Server 2005 I get the following error: Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'stock_item_code'. Is this a bug in SQL Server 2005, or is this the way ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Forcing GraphicsDevice creation before Game.Run
In order to incorporate Xna into an existing engine without a lot of ugly hacks, I need to force the GraphicsDevice to be initialised before the program loop starts (Game.Run). Can this be done Assuming this isn't possible (as seems likely), I'd need to ditch Game and handle device creation myself. This looks straight forward enough, except that it requires a handle to a window. This is no problem in windows, but what about on the xbox 360 Is there some sort of factory available that returns a GameWindow implementation for the platform it's running on Has anyone manually created a graphicsdevice on the 360 Pretty peculiar that we're getting different behavior. Think you could post some code For example, ...Show All
Smart Device Development NodeFont property in TreeView
I am using Visual Studio 2005 and .Net CF 2.0. There is no nodedfont property in .net CF. What I want to do is set bold on the parents, and normal for childs. What is the workaround In v 1.1 i will do it like it. check it whether it is helpful to you or not. node.NodeFont = New Font("Verdana", 8, FontStyle.Bold) ...Show All
Windows Live Developer Forums MS VB Run Time Error 429
Hello List, I hope you can assist me with a problem I created. I have a problem, I think, due to having an ADCenter.dll assembly out of synch with what is found in the system registry. This is based on the help text for the ActiveX component error, my application is throwing. I had to recreate this .dll and .tlb in order to modify the password hardcoded in the below routine. Private Sub SetAuthCredentials(ByRef pAPI As AdCenterAPI) We integrate the XML response from the web service into a Excel spreadsheet, and I believe that this the problem. The VB project contains a reference to the ADCenter, and is included into our Excel macros. The error is found within the following code block Public Sub MSNRequestReport(ByVal AccountID As Long, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream This is more of a comment thread then a question so much, As really there is no definitive answer. I think if you take a look at our partner, Garage Games, I think they are demonstrating that it can be used for serious gaming :-) It's up to the individual to decide though... ...Show All
Visual Studio problem adding solution to Sourcesafe
Very simple task you'd think, add a solution to sourcesafe and keep it in the same directory structure and location with reference to the root, NOT so!!!! SourceSafe through Visual Studio keeps creating additional structures. This is ridiculous. My solution is at C:\projects\Prototypes\IDE\MySolution\MySolution.sln The root of the present SourceSafe is C:\projects 1. I select the solution in Visual Studio and select "Add solution to source control". A dialog appears prompting me with name: MySolution.root location: $/ This creates a node name MySolution.root in the root dir C:\projects, which I do not want. 2. Instead I change the name to MySolution and change the location to C:\projects\Prototypes\IDE\ This then, frustratingly, ...Show All
