Jump to content
Xtreme .Net Talk

TheWizardofInt

Avatar/Signature
  • Posts

    334
  • Joined

  • Last visited

About TheWizardofInt

  • Birthday 09/25/1964

Personal Information

  • Occupation
    Integrator
  • Visual Studio .NET Version
    1.1
  • .NET Preferred Language
    VB

TheWizardofInt's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Dim dTime As Date = Now.AddSeconds(10) Do While Now < dTime Loop
  2. Yes - look at IO.Streamreader and IO.Streamwriter VB.Net did a really good job with their system.IO
  3. When you group Crystal Reports, it allows for a tree view on the side of the report in gigantic print that looks terrible I want to suppress the view onload. I tried using Java and calling it by name to make it invisible, but that doesn't work Any ideas? There doesn't seem to be a method for it
  4. I just had to do this, on a web farm with a 32 bit processor, so before someone ELSE wastes 3 hours doing research, here you go: 1. You will need cr_net_2005_mergemodules_mlb_x86.msm on your LOCAL computer where you plan to compile the program for deployment. You can get it here: http://support.businessobjects.com/communityCS/FilesAndUpdates/cr_net_2005_mergemodules_mlb_x86.zip.asp 2. Download the zip and store it in the c:\program files\merge modules section of your PC 3. Open your project for the site you want to deploy, and add a new project to it, which will be a Web Setup Project. Do NOT install the new project under folder for the existing project, pick some other location on your hard drive for it 4. In the solution explorer, under the project you just added for deployment, right-mouse-click on the project name and select Properties and then Add, then Project output, and add the Content Files 5. Right-mouse-click on the Project again and select Add/Merge Modules, and add that cr_net_2005_mergemodules_mlb_x86.msm, which will automatically add 2 other modules that you need. 6. Right mouse click on the Project AGAIN, select properies, then the Dependencies button, and check the Crystal Reports option Now you can deploy. Select the project and then Build. If it goes really fast and doesn't put a new deployment MSI in the Debug folder, go to the main project, rebuild THAT, and try again. In a regular web server environment, you can then just move the .msi to the server and install, overwriting your existing web site if you need to In a web farm, the .MSI is going to install a new directory under the existing, configured web site, and the existing web site still won't want to run Crystal. What you do is: 1. Install the website under the existing web site, like the MSI wants to do. If you try to run the program now, it will tell you that it can't find the right files to run Crystal 2. Write all of the files to the main directory for the web site, from the sub directory. 3. Now you'll get an error telling you that you mis-configured the web site with an App_Code folder, which of course is not what you want. Go back to your development computer, select the MAIN project, and deploy it like you normally would. Now that the files are in the right root, you can deploy and find them, even though the deployment tool is telling you that it is overwriting the existing site.
  5. I have the treeview added to the page at design time In runtime, I add a bunch of nodes to it Now, I want to select a node by firing the SelectedNode_Changed event It always finds the first node as selected Am I missing something here?
  6. Yep - that did it. Thanks For anyone else looking, put this in the page Head: <link rel="shortcut icon" href="Images/Favicon.ico" type="image/x-icon" /> <link rel="icon" href="Images/Favicon.ico" type="image/x-icon" /> If you want it to work in Internet explorer, you have to use an .ico image.
  7. How do you do that cool little logo thing? I don't even know what to call it to look it up I tried the usual 'View Source' on pages that had it and found nothing, as well
  8. I was in your position about seven years ago I programmed in (gasp) dBase 3.3+ in the Navy, I liked it, and I wanted to go back to programming. I was in sales at the time and making a LOT of money, but I hated the look of my own face every morning when I got up and looked in the mirror Say what you want about programmers - we are free. If your mind is creative enough, you can dye your hair blue, stencil "I am Jebus" on your butt and wear flip-flops to a funeral, and the worst you will get is, "See how the creative mind works?" So here is the DEFINITIVE method to get yourself into 'the business'. This isn't 'mighta/shoulda/coulda'. This is 'does.' 1. Identify your niche. You do NOT have the time or the ability to embrace every facet of programming. It is better to shine in your corner than to glow in full daylight. Pick the SPECIFIC thing about programming that gives you the passion to write code, and do that and only that. In my case, it was the GoldMine program - I really liked it, I knew a lot about it, and no one else at the time was doing what I knew I could do with it. I used my ability to accent an already good program with add-ons to lay the foundation of my business model 2. Sit your butt down and write yourself a business plan - this is where most new developers will fail. You don't get to just start coding - it might work eventually but it takes a long time, and you don't get to tell your mortgage company and your stomach "I will feed you well next year, but not at all this year." Get a real pencil and a real piece of paper, and write things like: I will write in this language I will address these needs I will appeal to these sorts of consumers I will collect money this way I will need these resources etc. When you are done, post it on a wall where you can see it and where you can update it. Keep in mind that a business plan is not a suicide pact - as your industry changes, you have to change with it, or die. 3. Reach potential consumers by joining and posting to every single forum, newsgroup, board and blog on your niche. Read all of the posts, reply to all of the posts you can, in such a way as you are saying, "See what I know." This is where you can give away clever code snippets demonstrating that you are REALLY in it for the love of the product, and you are the guy with the answers. This will get your name out to the people who are most likely to hire you on the spot: the ones who have already tried and screwed up. In every industry on the planet, these are the highest return. I learned this doing construction - the person with his hands in bandages, a sledge with a bloody handle and a 1/2 broken set of concrete steps in front of their house paid a LOT more than the guy who was bidding out his front walk to 15 different contractors 4. Promise work at about 110% of your ability or lower, meaning that you should take on jobs that you can either do, or which involves technology that you are very sure you can learn. Don't promise to write a program for $5,000 that involves interfacing with a phone switch, if you know nothing about phone switches but figure that, in the amount of time it will take you to spend $5,000, you can learn. This is another common error among developers. We all learn on the customer's dime - there is a difference between having to learn a java routine for your ASP.Net page, where you've done very little java, and trying to address an industry you know nothing about. 5. Charge a LOT for your time. Hiring a consultant should be economically painful. No less than $125/hr, most now are doing more. Why? No one wants a cheap consultant. Welcome to capitalism - things are worth what they cost, time and knowledge included. If you are making less than the guy who hires you, then you clearly aren't worth as much as he is, and then what is the point? In fact, you get to buy those great weight-lifter addition books for $49.95, where you really need only seven pages of information from them. You get to pay $500 to go to a lecture or $1,250 to upgrade to version 1.0125 from version 1.0124 (which turns your microwave oven on every time you hit F4). If you can't afford to be current, you will be short lived. 6. This is the key: make yourself identifiable. Make sure your website doesn't look like anyone else's website, don't identify yourself by name. Be 'the VB Guy' or 'Magic Fingers' or something that sticks in a consumer's mind. I chose 'the Wizard' because I liked Dungeons and Dragons as a kid and because that was my nick name when I used to repair nuclear reactors. This made it very easy for people to say, "You should contact The Wizard for help with that." That sounds stupid, but if they don't easily remember who you are, you won't get calls. This leads to the final point: 7. Be easy to contact. I did a lot of business with Australia, and one of the reasons why was that I left my MSN messenger on 24/7 and they could message me with their questions, and I would wake up and give them answers. If it was a matter of needing to be 1:1, then I could always stay up late or get up early, or they could, all of this being arranged on Messenger. It is often the case that the person who gets the job is the person whom they can get in touch with I am not the best programmer here. I am not among the top programmers here. Right now, I am working for someone else because I would rather right fantasy than program, and this pays the bills because I made enough in the seven years that I programmed as a consultant to retire. When my kid is out of school in 4 years, I am pretty much gone
  9. This was one of those things that was too easy to get, so I thought I would post it here and save the next person some grief In your master template, put this in your code behind: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then 'create an image here - this can be any img that already exists on the site Response.Write("<img id='img1' src ='images/red-x.gif' Style='left: 500px; position: absolute; top: 200px' />") Response.Write("<script language=javascript>;") Response.Write("var dots = 0;") Response.Write("var dotmax = 10;") Response.Write("function ShowWait(){") Response.Write("}") Response.Write("function StartShowWait(){") Response.Write("var output;") Response.Write("output=document.getElementById('img1');") Response.Write("output.style.visibility='visible';") Response.Write("window.setInterval('ShowWait()',1000);") Response.Write("}") Response.Write("function HideWait(){") Response.Write("var output;") Response.Write("output=document.getElementById('img1');") Response.Write("output.style.visibility = 'hidden';") Response.Write("window.clearInterval();") Response.Write("}") Response.Write("StartShowWait();</script>") Response.Flush() Thread.Sleep(10000) End If End Sub At the top of the page, add 'Imports System.Threading to accomodate the Thread.Sleep Now, on the HTML source for the Master Template page, go to the Body line and add onload="HideWait(); Don't forget the semicolon or it won't work Now this image pops up as pages load and, when the page is DONE loading, it executes the Javascript 'HideWait' function and kills the image. You don't have to do anything to any of the other pages
  10. I decided to blaze the trail on 7.0 I have found that, using it with Visual Studio.Net 2005, the Panel control tends to want to adjust itself smaller, and then has to be manually resized, even when it contains controls I noticed that controls with variable sized datagrids and buttons were cutting off the bottoms I ran the same code in IE 6 and IE 7, and in the older version it didn't do this. Anyone else seen it?
  11. What do you mean specifically by 'use instance data'?
  12. Here is an example from some working code Try oConn = New SqlClient.SqlConnection("Server=" & cmbSQLServer.SelectedItem & ";Database=" & _ cmbDatabase.SelectedItem & ";uid=" & txtSQL.Text & ";pwd=" & txtSQLPass.Text & ";") oConn.Open() Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "An error has occurred") Exit Sub End Try sSQL = "Select Top 1 * FROM " & lstTables.SelectedItem Try cmd = New SqlClient.SqlCommand cmd.CommandText = sSQL cmd.Connection = oConn da = New SqlClient.SqlDataAdapter(cmd) da.Fill(dt) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "An error has occurred!") oConn.Close() Exit Sub End Try Let me know if that doesn't send you on the right path
  13. I have a Table called 'GridGroups' with a primary field 'GridGroupID' There is a secondary table called 'GridTrans' which also has a field, 'GridGroupID', which is not primary. This second table uses a ForeignKey relationship to the primary for the two GridGroupID's. Don't ask me why - not my database, and I don't like Foreign Keys for just this reason. Now I want to delete the GridGroups, so (and correct me if I am wrong) I should: 1. Delete all of the rows in GridTrans with this GridGroupID 2. THEN delete the one row in GridGroups with that GridGroupID I can do (1), (2) throws this error: Integrity constraint violation: Primary key for row in table 'GridGroups' is referenced by foreign key... Have I missed a step here? This, by the way, is a Sybase database
  14. I used to be an independent contractor, but now am doing exactly what you're doing, working as the only developer for a company that does a web-based app dependent on a database I wrote, "The Dynamic Data Dictionary" as a discussion of how to use one Insert and Update statement for all of your inserts and updates. This isn't a 'buy my book' post, that is just a point of reference. I am a great believer in a data dictionary for ease of maintaining your fields and keeping code down. By writing a single statement that uses command parameters, and keeping the all of the field criteria in the datatable table, I cut down my overhead and my error trapping, and this means I write better code and write it faster. Hope that helps
  15. Ok, I worked this out, so I am going to share it. The problem here, of course, is that everything you do in ASP.net is Server Side, and what you need to do here is a client side append So you have to use javascript to capture the data client side, and then force a postback to move the data server-side, where you capture it AGAIN, and put it in your datagrid So I created a button on the form, which was a simple HTML input button: <input type="button", id="btnCB" value="Import From Clipboard" onclick="fnPaste()" /> Next I created the function mentioned in the onclick in the Script section of the header function fnPaste() { //this captures the click event for btnCB and creates a postback //the is picked up in the postback of the page load, and then moved to //the processarg sub var s = window.clipboardData.getData("Text"); __doPostBack('__Page', s); //txt.focus; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } And in the postback of the page, we capture the data and send it off to be processed: Dim eventArg As String = Request("__EVENTARGUMENT") If Not eventArg Is Nothing Then If eventArg.Length > 0 Then ProcessArg(eventArg) End If End If In an excel spreadsheet, the lines come in broken up by chr(10) + chr(13), which is the equivalent of VBCRLF. The cells are broken up by the tab, which is chr(9). This lets you easily grab the data per line, and diseminate it per cell
×
×
  • Create New...