Topics
-
- 2 replies
- 1.1k views
In code, is there a way to reference the name of the sub or function you are in? When an error messages is shown (using ex.ToString) it lists the various subs, so it knows the names, so I'm wondering if that's accessible to Visual Studio 2005 VB.NET code as well. Example... Private Sub ProcessInvoices() End Sub In this sub, it is possible to refer to the name "ProcessInvoices"? (So if the sub name ever changes, then every place I refer to the sub name, it will automatically be the same?)
Last reply by JDYoder, -
- 2 replies
- 1.7k views
Hi, I dont like posting on here, when I'm sure it's an easy answer but for some reason I cannot get the following to actually INSERT the record : OleDbConnection myConnection = new OleDbConnection(Properties.Settings.Default.dataConnectionString); OleDbCommand myCommand = new OleDbCommand("INSERT INTO DataLog(myData) Values('geoff')",myConnection); myConnection.Open(); myCommand.Execute(); It executes the code without an error, and if I use ExecuteNonQuery it returns saying 1 row has been affected, but when I then view the db it has not been inserted. Any ideas gratefully received, Cheers, Sparky.
Last reply by FZelle, -
-
- Administrators
- 1 reply
- 1.7k views
We have a 3rd party app that has been installed to one of our network servers and is to be run from a share. In the documentation that came with the program, the company has stated that they wanted the Local Intranet CAS settings ste to Full Trust. I don't have a huge problem with that, but it seems like a bit of overkill to me. There are also about 500 users (many without local admin rights) that would need to update this, and I don't want to have to go to every machine. I know that caspol.exe will allow me to update settings, and I can also specify just a specific share to give privledges to. The network group can probably push it out as a script that updates the…
Last reply by PlausiblyDamp, -
-
- 0 replies
- 1.2k views
Hi guys, I used to use VB6 to program. Now I'm trying to upgrade to VB.NET. My idea of this small program is this 1, read data from Excel 2, draw rectangle using the data Follows my code Option Explicit Dim X1 As Integer Dim X2 As Integer Dim Y1 As Integer Dim Y2 As Integer Private Sub Form_Load() Dim oXLApp As Excel.Application 'Declare the object variables Dim oXLBook As Excel.Workbook Dim oXLSheet As Excel.Worksheet Set oXLApp = New Excel.Application 'Create a new instance of Excel Set oXLBook = oXLApp.Workbooks.Open("D:\New Folder\Book1") 'Open an existing workbook Set oXLSheet = oXLBook.Worksheets(1) 'Work with the first worksh…
Last reply by solartorch, -
More Spam?
by mskeel-
- *Experts*
- Leaders
- 9 replies
- 1.9k views
Has this board been assaulted by more spam recently or am I just imagining things? It just seems like over the past few weeks there has been more spam posts than normal (more than zero and sometimes two or three at once). Any thoughts? Mods, you probably know best. Is there a spam wave or is it just me?
Last reply by mskeel, -
-
- 0 replies
- 3.8k views
Good Morning, I have a page with a GridView GV1 with another GridView Embedded in it called GV2. GV2 is typically not available until I fire an event on it, when I have to instantiate it by a statement GridView GVChild = (GridView)GV1.SelectedRow.FindControl("GV2"); However, on firing the OnPageIndexChanging event of GV2, I do not know how to get the selectedRow value of the Parent GridView GV1, so I can page on only records associated with the row of GV1. Thanks Guha
Last reply by gprabaka, -
- 1 reply
- 718 views
i need to debug a class librerary project. i go to the debug menu, and click on attach to process, i attach it to the sqlsvr process, as its a clr sproc i want to debug. any break points i create just give me the error "the breakpoint will not currently be hit. no symbols have been loaded for this document." i have tried restarting my sql service, tried reopening my project but no luck. has anyone got any ideas here?
Last reply by mskeel, -
- 1 reply
- 1k views
Hi all, How can I use a hyperlink to open a new window with no statusbar, toolbar, etc. Thanks, Theo
Last reply by wayneph, -
- 0 replies
- 3.1k views
Hi, I have to make a software the should be able to send emails using proxy socks 5 connections to send out it's emails. (in C#.VB.NET) i have found the code to connect using sock 5 from internet in c#. I dont know much about sock 5. I am familiar with Server/Client Architecture and simple sockets. Please tell me how i will send email ? i also know some sock 5 proxy ip and port # that work. Can anybody help me in how to implement sending mail using sock 5 proxy ? Thanks.
Last reply by fahad_mehdi, -
-
- *Experts*
- Leaders
- 10 replies
- 3.5k views
I've become frustrated with using the Visual basic standard edition.You're mostly limited to the stock provided dll's and can't really import new ones. I think I'd be interested in learning how to program vb .net completely from notepad. I ran and debugged a simple application from the command line.The problem was when I tried importing a reference to system.Windows.forms and got a class not recognized error,yet it imported system.io just fine. When I used java I just adding the dll's to the directory and used the imports statement and everything worked,but not with vb .net. How do you add references in notepad?Does anybody have any links for developing …
Last reply by anthony, -
-
- 1 reply
- 2.7k views
First time with regular expressions, I want to match strings that contain .com OR .co.uk OR .info How do I go about that? Thanks
Last reply by IngisKahn, -
-
- Administrators
- 3 replies
- 2k views
Dear All, I am writing a software where the software are printing notes to 3 different printers. Which is connected via LPT and Print Server. Things are working fine and notes could be printed out actually. But, I want to achieve to a stage where if one of the printer is out of order (means the jobs have stored in the print pool for like maybe after 5 minutes, cause cannot print out from print pool), I want the print job to be automatically transfer to the other printers. So, I would assume as below: i. I need to read from the print queue, to check whether all the jobs have been printed out. ii. I need to change the printer if the jobs have remain in the poo…
Last reply by georgepatotk, -
-
- 3 replies
- 1.1k views
Object reference not set to an instance of an object. I have a control on my form called cbocontact. I call cbocontact.selecteditem.text and I get this wierd error. I have other cbo's that I use on this for the same exact way and get no errors. It is wierd. If I change the name I get the usually code corrections. Then I change the name back to it's original and the code errors or underlines are still there like the object doesnt exist. I tried deleting it and recreating it but It still causes the same error. Has anyone ever had this? Please Help!
Last reply by mskeel, -
- 2 replies
- 5.7k views
I have this simple for each loop For each row as datarow in dtResults.rows ' Send the email Next Now I dont want to send the email everytime based on the value in one of the columns in dtResults, so I need For each row as datarow in dtResults.rows If row.item(0).tostring = "" then Next End If ' Send the email Next However this will not compile, it there anyway I can call the next in two different places based on logic? Thanks
Last reply by mskeel, -
- 1 reply
- 909 views
Hi all I am using the following code to download a generic file: Private Sub DownloadFile(ByVal filePath As String, ByVal fileName As String) Dim liveStream As FileStream = New FileStream(filePath, FileMode.Open, FileAccess.Read) Dim buffer(CType(liveStream.Length, Integer)) As Byte liveStream.Read(buffer, 0, CType(liveStream.Length, Integer)) liveStream.Close() Response.Clear() Response.ContentType = "application/octet-stream" Response.AddHeader("Content-Disposition", "attachment; filename=" & fileName) Response.BinaryWrite(buffer) Response.End() End Sub The file path value is: "c:\test.csv" …
Last reply by MrPaul, -
- 0 replies
- 912 views
Dear, I'm trying to remove a user from active directory... unfortunately this doesn't work....I'm using the code below but this failes... I use the administrator as DirectoryEntry but for some reason it doesn't find the other user in it's child objects.... using System.DirectoryServicesprivate DeleteUserFromActiveDirectory(DataRow in_Gebruiker){ DirectoryEntry AD = new DirectoryEntry(strPathActiveDirectory , strUsername, strPassword) DirectoryEntry NewUser = AD.Children.Find("CN=TheUserName", "User"); AD.Children.Remove(NewUser); AD.CommitChanges(); AD.Close(); } When I use a filter, I DO find the the child obje…
Last reply by inter, -
- 2 replies
- 1.4k views
I am trying to create an application to read data from an Excel file. I have added a COM reference to excel using the reference add utility. using Microsoft.Office.Interop.Excel; I though this command would expose the excel commands to intellisense but that is not the case. Does doing the above make the excel stuff work even though it does not come up in Intellisense or am I missing a step? MT
Last reply by MTSkull, -
- 0 replies
- 978 views
//initialize excel objects //FileName is passed in from the calling function which is loaded via // an ini file with this value "R:\Production_Test_Files\Command_Scripts\Bootload_Test.xls" //When I view this value while the code is running, it changes the "\" to "\\" string ExWorkBook = FileName; //if I uncomment the next line there are no problems. //ExWorkBook = "R:\\Production_Test_Files\\Command_Scripts\\Bootload_Test.xls"; Excel.Application oApp = new Excel.Application(); //CRASHES next line with 'File not found error', NOTE: the Gap in the value is not present in the IDE... Excel.Workbook oWB = oApp.Workbooks.Open(ExWorkBook,Mis…
Last reply by MTSkull, -
- 1 reply
- 1.2k views
Hello, I have an ASP.NET page on which I have 5 GridViews. On each gridview I have a link column which will display the child info on the next gridview. When I click and display the next gridview I want to make the page scroll down to the location of that gridview, without the user having to scroll down. Can anyone tell me a good way to do this. Thanks Guha
Last reply by LostProgrammer, -
- 1 reply
- 976 views
I have a few visual basic functions that I want to move onto my SQL 2000 server. I've never written a stored procedure before, could someone give me a few pointers on how I would execute the following as an SP Public Class SQLDatabase Private conn As SqlConnection Public Sub New conn = New SqlConnection("MyConnectionString") End Sub Public Sub openDB() If conn.State = ConnectionState.Closed Then conn.Open() End If End Sub Public Sub closeDB() If Not (conn.State = ConnectionState.Closed) Then conn.Close() End If End Sub Public Function GetCoOrds(ByVal postcode As String) As String Try Dim cmd As New SqlCommand("SELECT grideast,gridnorth From gridrefs WHERE postcod…
Last reply by barski,
-
Who's Online 0 Members, 0 Anonymous, 46 Guests (See full list)
- There are no registered users currently online