Topics
-
- 0 replies
- 1.7k views
I have a database field, called "hours" which has a float datatype. I am doing a query on the database table and extracting the field along with other fields into a dataset in the App_Code folder. In this dataset I have a datatable which has a column called "hours" and is a System.Decimal datatype. Now in my data entry form, I have a validation statement which ensures that users only put in valid times, i.e. anything over 59 minutes is not allowed. I am attaching the afore mentioned dataset to a crystal report which I am using to display all the data. At the end of the report I am doing a summary operation which Sums all the "hours" data together. The problem th…
Last reply by mike55, -
-
- Administrators
- 7 replies
- 8.9k views
I am attempting to include a .pdf document as an email attachment. The following is the code that I am using: Dim smtpClient As New SmtpClient Dim message As New MailMessage SendEmail = True Try ' Gets the SMTP Email credentials If GetEmailAccountDetails(emailSmtp, emailUser, emailPass) = True Then Dim fromAddress As MailAddress = New MailAddress(sender) Dim smtpAuthentication As New System.Net.NetworkCredential(emailUser, emailPass) 'Sets the smptclient properties smtpClient.Host = emailSmtp smtpClient.UseDefau…
Last reply by PlausiblyDamp, -
-
- 1 reply
- 5.2k views
Hi, I have a rdlc report and a table. In my project i have some 3 datasets built by me (a class with public properties). Anyway, when i dragged an item in my table i accidentally dragged one from the wrong dataset and now in the table's datasets list there is always this dataset that i don't need. Does anyone know how to remove it from there (except for recreating the table), because every time i load the report i have to load that dataset also. Thanks
Last reply by techmanbd, -
-
- Administrators
- 6 replies
- 1k views
I have a 3rd party bus communications box and there is a dll that comes with it to speak to this box through the USB port. At one time I could have 3 to 5 of these boxes connected. I would like to just use one form to talk to all these boxes. Here is what happens. I will use 2 boxes as an example. If I run the EXE file, it will talk to 1 of the boxes. If I want to talk to the second box, I have to run the exe file a second time. Now I have been trying to do this with one form so I don't have mutiple executables running at the same time and not having success. Can someone lead me into the right direction? What to look in to? I will still search as well. I have a fee…
Last reply by techmanbd, -
-
-
- *Gurus*
- 3 replies
- 19.1k views
I get the following error - Cannot access a closed file - within the following code at the line highlighted red. 'Processing. For a = 1 To iNumDays Step 1 sFile = String.Concat("access.Q", sDate7) sReadFile = String.Concat(sPath, sFile) If a = 1 Then If File.Exists(sReadFile) Then sContents = New ArrayList() 'Open file. fsInput = New FileStream(sReadFile, FileMode.Open, FileAccess.Read) srInput = New StreamReader(fsInput) …
Last reply by wassif, -
-
-
- Administrators
- 2 replies
- 766 views
I'm trying to track down a memory leak/Unreleased object that seems to happen when I use a particular way of opening a form. I have not included all dispose references but they are there in my code. I have created a small test program that has 3 forms. Form1 just opens Form2 and Form2 will open up my report viewer and display my report. Form2 is opened this way in button_click Dim f2 As Form = New Form2 f2.ShowDialog() f2.Dispose() Form2 has a button to open up my viewer If I use Form2 - Private Sub btnViewReport1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewReport1.Click Form4.ShowReport(New ddSummaryReport…
Last reply by Data Danger, -
-
-
- Administrators
- 1 reply
- 3.5k views
Hi I want to build a "Database" on video files and I want to know if the video file is still on hdd or not (User deleted/moved it). So I need a reliable source to identify the files. Since filename changes are often the case, its not unlikely that two video files have the same size and hashing them takes to long for a quick checkup. So I thought I could use the meta-data I can enter into almost every file. (Under WinXP if you rightclick a file -> properties -> Summary Tab) But it seems that I won't work with avi files since the textboxes are grayed out. If somebody knows about how to use those datafields please let me know, since I have a few qu…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 4 replies
- 1.9k views
I'm doing this custom user control, I'm also working with designers and I need to use the Interfaces described in the topic subject. But I have a little situation. If any of those interfaces are not initialized somewhere in the code (ie: IComponentChangeService ICCS = (IComponentChangeService)GetService(typeof(IComponentChangeService))), I get an exception. But, I'm using these interfaces in lots of places in the code and in different classes, one of them doesn't even allow me to use the "GetService" method, it says it is not available in this context. So, I'm looking for a way, to initialize these 3 interfaces just once and be able to use them everywhere I want. But I…
Last reply by Nazgulled, -
-
- 1 reply
- 693 views
I have WinXP Pro SP2 and VS2005 SP1. I'm converting my projects from VS2003 to VS2005 and I receive a lot of warnings in several projects. For example, to one of my projects (for example MyProject.vbproj) I receive the following result in the command prompt: Build succeeded: ... ... (a lot of warnings) ... 95 Warnings(s) 0 Errors Time elapsed 00:00:00.61 But, I'm creating and application in VB2005 that use MSBuild of the following way: MyProcess = New Process MyProcess.StartInfo.FileName = "..\..\msbuild.exe" MyProcess.StartInfo.Arguments = "MyProject.vbproj /t:Rebuild /p:Configuration=Release" MyProcess.StartInfo.CreateNoWindow = True M…
Last reply by jdccr, -
- 0 replies
- 661 views
Could a guru of networking and databases please help me with this problems please? I need to know which of the following methods is better, ie less network pounding.... Situation: A sql server database running on a host 25 miles away. two maybe three queries need to be run to import very large data into a local c: drive database. Option 1: An MS Access database application with the required make table queries Option 2: A VB.NET application importing the data into a mdf file using sql server datasource Is my thoughts that option 2 would be more efficient and less network hungry? Thanks for any advice on offer.... Edit/Delete Message
Last reply by pachjo, -
-
- Administrators
- 2 replies
- 2.4k views
I just backed up and re-formatted my hard drive lastnight, in hopes that my computer would have enough room for VS 2005 Express Edition. I activated & registered my copy of WinXP Pro (5.1.2600 Service Pack 2 Build 2600), and fell asleep during the agonizingly long Windows Update service, just as usual. However, once I had everything all up-to-date and installed VC# 2005 Express, I ran into a strange error. I couldn't seem to debug (or run) an application. I kept getting the following messages, seemingly at random: "The application failed to initialize properly (0xc0000007)� "The application failed to initialize properly (0xc0000135)� My first assumption was …
Last reply by PlausiblyDamp, -
-
-
- Administrators
- Leaders
- 3 replies
- 963 views
I have 3 forms shown this way. Form1 form1 = new Form1(); Form1 form2 = new Form1(); Form1 form3 = new Form1(); form1.Show(); form2.Show(); form3.Show(); Form1 has a textBox1 and a button1 controls, now my problem is how can I pass the text in (form3)textBox1.Text to (form1)textBox1.Text by using the button1_Click since this.textBox1.text refers to the sender(form3). Any ideas?
Last reply by snarfblam, -
-
-
- Leaders
- 1 reply
- 790 views
Hi, How can I select/unselect all items of a CheckedListBox ONLY VIA FOR EACH? This won't work for me: For Each Chk As CheckBox In FieldsCheckedListBox.Items Chk.Checked = True Next Thanks.
Last reply by snarfblam, -
-
-
- Administrators
- 3 replies
- 3.1k views
I was wondering if anyone knows a way to request the time from a remote server without creating a server-side application. I am writing some time-dependant software and am unable to install anything on the server I need to use for the time. I know that I could just set the host computer to use the server as a time server through Windows, but I want to make sure that I'm pretty accurate down to the second. I don't want to risk something happening that it doesn't update its time and gets off by a second. I have scoured the internet and this forum for a related issue, but I couldn't find anything. Thanks in advance for any and all help! ~Derek
Last reply by Fork501, -
-
- 1 reply
- 654 views
I am needing to serialize a hashtable at designtime in a component and need some advice. Should I inherit from HashTable for from DictionaryBase, and what is the best method to carry this out? I need the key and value to be set at designtime in the properties window.
Last reply by mooman_fl, -
- 1 reply
- 1.5k views
Hi, I use this .NET code to get the IP address of all my current DNS server: Imports System.Net.NetworkInformation Imports System.Net Dim nics As NetworkInterface() Dim dnsIPs As IPAddressCollection nics = NetworkInterface.GetAllNetworkInterfaces() For Each nic As NetworkInterface In nics If (nic.OperationalStatus = OperationalStatus.Up) Then dnsIPs = nic.GetIPProperties().DnsAddresses For Each dnsIp As IPAddress In dnsIPs MessageBox.Show(dnsIp.ToString()) Next End If Next It works great but in .NET, I need to do the same also in VB6. But don't know where to begin, VB6 is too weak! :(
Last reply by techmanbd, -
-
- *Experts*
- 4 replies
- 1.4k views
hi every body , its first sharing with you but now i need to your help i want to draw rectengle as at picture or this photo http://www.arabmoheet.net/forum/Members_Upload_Pics/21334/12.JPG i making a graphic program , when i finished it i will be attach at our forums (xtreme) i am from egypt so my mother language is arabic , so exuseme for any language error . good bye my friends.
Last reply by alaa gomaa, -
-
-
- Administrators
- 1 reply
- 850 views
I am using Windows authentication, with authorization set to deny users="?" I have set up three folders within my application, Admin, Staff, and All. I will have two roles, "admin" and "staff". The idea that I have is to prevent "admin" users from the Staff folder, and "staff" users from the Admin folder and that both "admin" and "staff" would have access to the All folder. My problem is that I am unable to assign a custom role to individual windows users. I have tried to use the following code: Dim userIdentity As GenericIdentity = New GenericIdentity(HttpContext.Current.User.Identity.Name) Dim roles() As String = New String() {"admin"} Dim use…
Last reply by PlausiblyDamp, -
-
- 1 reply
- 725 views
I am trying to store decimal values in a SQL Server 2000 database, each decimal value can only have a max of two digits after the decimal point. In my database I have created my field, and set the precision to 7, and the scale to 2. This automatically adjusted the length of the field to 5. I am using stored procedures to insert data into the database table, I have specified that I am passing a decimal datatype of size 5. My problem is that if I insert the value 1.50, it automatically rounds it up to 2.0. Any suggestions on how to stop the rounding occuring as it seems only to occur when I am passing the value into the database through the stored procedure. …
Last reply by mike55, -
- 1 reply
- 8.5k views
VB.NET code to prevent Expand() and Collapse() from firing when TreeView is doubleclicked. Add this class to your project: 'DoubleClick-expand restriction hack Public Class cTreeViewDblClickHack Private WithEvents m_tv As TreeView Public Sub New(ByVal tv As TreeView) m_tv = tv End Sub Private m_FirstMouseDownTime As Long Private blnDoubleClick As Boolean = False Private Sub tv_BeforeExpand(ByVal sender As Object, _ ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) _ Handles m_tv.BeforeExpand If blnDoubleClick AndAlso e.Ac…
Last reply by melegant,
-
Who's Online 0 Members, 0 Anonymous, 59 Guests (See full list)
- There are no registered users currently online