Search Results

Search found 4334 results on 174 pages for 'sender'.

Page 104/174 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • Task.wait not working as I imagined

    - by user2357446
    I am trying to download a file, wait for the file to finish downloading, and then read the file afterwards. I have the following methods to do this: private async Task startDownload(string link, string savePath) { WebClient client = new WebClient(); client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged); client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted); await client.DownloadFileTaskAsync(new Uri(link), savePath); } private void checkUpdateButton_Click(object sender, EventArgs e) { Task task = Task.Factory.StartNew(() => startDownload(versionLink, versionSaveTo)); task.Wait(); if (task.IsCompleted) { checkVersion(); } } The checkVersion() method reads the file that was downloaded. This is throwing an IOException saying that the file is in use by something else and cannot be read. I thought that having task.Wait would prevent the rest of the method from executing until the task was finished?

    Read the article

  • an asp.net routing issue

    - by Adam Right
    my route implementation on Global.asax protected void Application_Start(object sender, EventArgs e) { this.intRoutes(RouteTable.Routes); } void intRoutes(RouteCollection Rts) { Rts.MapPageRoute("search", "{language}/{page}", "~/search.aspx"); Rts.MapPageRoute("category", "{language}/{name}/{no}/{categoryname}", "~/category.aspx"); Rts.MapPageRoute("product", "{language}/{name}/{no}/{productname}", "~/product.aspx"); } the problem is; if i use product routing on a hyperlink, like as follows; <asp:HyperLink ID="hyProduct" NavigateUrl='<%#HttpUtility.UrlDecode(((Page)HttpContext.Current.Handler).GetRouteUrl("product", new{ language=getUIFromHelper(),name=getNameFromHelper(),no=Eval("code"),productname=getProductNameFromHelper(Eval("name"))})) %>' runat="server" Text="something" /> everything goes fine, the link is written as expected like /en/products/06.008.001.150.0510/davis-fish-seeker-green but when i click that link the category.aspx page runs insted of product.aspx. am i missing out something ?

    Read the article

  • Implementing activity indicator

    - by Prash.......
    I am implementing an activity indicator in my application. In my application on button click a webservice is called and it takes some time. To show the user that process is going on I implemented an activity indicator: CGRect frame = CGRectMake(140, 300, 40, 37); UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:frame]; activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; [self.view addSubview:activityIndicator]; This Snippet is written in viewDidLoad() method, and I have an action called, -(IBAction)agree:(id)sender { //here webservice is called } I have to start that activity by [activityIndicator startAnimating]; But I am unable to start that activityIndicator, please suggest a proper solution for that.

    Read the article

  • How do I drag and drop a folder in Winforms?

    - by Tuntuni
    I would like to know how to drag & drop the folder and get its name. I already know how to do it with a file, but I'm not really sure how to modify it to be able to drag folders as well. Here's the code of the event that is triggered when a file is dropped. private void checkedListBox_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { //I'm only interested in the first file, even if there were multiple files //dropped string fileName = ((string[])e.Data.GetData(DataFormats.FileDrop))[0]; } } Thanks, Tuntuni.

    Read the article

  • C# Serial Communications - Received Data Lost

    - by Jim Fell
    Hello. Received data in my C# application is getting lost due to the collector array being over-written, rather than appended. private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { try { pUartData_c = serialPort1.ReadExisting().ToCharArray(); bUartDataReady_c = true; } catch ( System.Exception ex ) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } In this example pUartData_c is over-written every time new data is received. On some systems this is not a problem because the data comes in quickly enough. However, on other systems data in the receive buffer is not complete. How can I append received data to pUartData_c, rather than over-write it. I am using Microsoft Visual C# 2008 Express Edition. Thanks.

    Read the article

  • Forcing A Postback Asp.Net

    - by Nick LaMarca
    Please take a look at the following click event... Protected Sub btnDownloadEmpl_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDownloadEmpl.Click Dim emplTable As DataTable = SiteAccess.DownloadEmployee_H() Dim d As String = Format(Date.Now, "d") Dim ad() As String = d.Split("/") Dim fd As String = ad(0) & ad(1) Dim fn As String = "E_" & fd & ".csv" Response.ContentType = "text/csv" Response.AddHeader("Content-Disposition", "attachment; filename=" & fn) CreateCSVFile(emplTable, Response.Output) Response.Flush() Response.End() lblEmpl.Visible = True End Sub This code simply exports data from a datatable to a csv file. The problem here is lblEmpl.Visible=true never gets hit because this code doesnt cause a postback to the server. Even if I put the line of code lblEmpl.Visible=true at the top of the click event the line executes fine, but the page is never updated. How can I fix this?

    Read the article

  • Change WPF Datagrid Row Color

    - by juergen d
    I have a WPF datagrid that is filled with an ObserverableCollection. Now I want to color the rows depending on the row content at the program start and if something changes during runtime. System.Windows.Controls.DataGrid areaDataGrid = ...; ObservableCollection<Area> areas; //adding items to areas collection areaDataGrid.ItemsSource = areas; areaDataGrid.Rows <-- Property not available. how to access rows here? CollectionView myCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(areaDataGrid.Items); ((INotifyCollectionChanged)myCollectionView).CollectionChanged += new NotifyCollectionChangedEventHandler(areaDataGrid_Changed); ... void areaDataGrid_Changed(object sender, NotifyCollectionChangedEventArgs e) { //how to access changed row here? } How can I access the rows at start and runtime?

    Read the article

  • How to set an alarm to fire properly at fixed time?

    - by Pentium10
    I have this code Calendar c = new GregorianCalendar(); c.add(Calendar.DAY_OF_YEAR, 1); c.set(Calendar.HOUR_OF_DAY, 23); c.set(Calendar.MINUTE, 22); c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); // We want the alarm to go off 30 seconds from now. long firstTime = SystemClock.elapsedRealtime(); firstTime += 30*1000; long a=c.getTimeInMillis(); // Schedule the alarm! AlarmManager am = (AlarmManager)ctx.getSystemService(Context.ALARM_SERVICE); am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, c.getTimeInMillis(), 1*60*60*1000, sender); It is not executed at 23:22h What I am doing wrong? I noticed firstTime and c.getTimeInMillis() differs a lot in size and length. When I use firstTime, so when set to 30 seconds, the alarm is executed well.

    Read the article

  • DataGridView and the CellEndEdit Event

    - by Brandon
    I have a DataGridView, and would like to hook into the CellEndEdit event. I've been able to successfully hook into the CellContentClick event, but am having issues with CellEndEdit. I added the following code to my Form1.cs file: private void dataGridView1_CellEndEdit(object sender, DataGridViewCellCancelEventArgs e) { dataGridView1[0, 0].Value = "Changed"; } With that code, nothing happens when I am done editing a cell. Is there anything else that I need to do to successfully hook into this event? I see that CellContentClick has a this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); line of code in the Form1.Designer.cs file, but I tried to mimic this for CellEndEdit, and received a compile error (No overload for 'dataGridView1_CellEndEdit' matches delegate 'System.Windows.Forms.DataGridViewCellEventHandler')

    Read the article

  • Retreiving data from grid view cell to a text box

    - by Bader
    Hello , i am trying to retrieve a cell data to a textbox , that will happen when i select any row in the grid view , the textbox will take the new value i already enabled auto post back to the textbox here is my code protected void GridView2_SelectedIndexChanged(object sender, EventArgs e) { TextBox3.Text = GridView2.Rows[GridView2.SelectedIndex].Cells[2].Text; } however , there is not error in the syntax , it doesn't retrieve any thing in the textbox , any suggestions ? i am using using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data.Sql; i work in C# , Visual studio 2010 express web developer

    Read the article

  • What is the correct way of handling a reloaded view after it was dismissed?

    - by favo
    Hi, I have the same problem as the guy here: http://stackoverflow.com/questions/2682844/uiimagepickercontroller-reloads-view-after-its-dismissed I have a UIView with a UIDatePicker within a Popover. When the Popover is dismissed and presented again, it sometimes resets the Picker in the view because hidden views are unloaded when a memory warning occurs. This is the part displaying the view: endCompareDateTimePicker.picker.maximumDate = [NSDate dateWithTimeIntervalSinceNow:0]; [endCompareDateTimePopover presentPopoverFromRect:sender.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; The picker (IBOutlet UIDatePicker) does not stay initiated. Adding a [endCompareDateTimePicker loadView] helped out and got me the picker initiated to set the correct date values before displaying the view. While this is working, I dont think this is the proper way doing this. What would be the correct way to handle this situation?

    Read the article

  • Simple iPhone tally method question

    - by Rob
    Just trying to create a simple method that counts up 1 on the tally when the button is pressed. My knowledge is extremely limited and I am pretty sure that my problem is somewhere in the method implementation: -(IBAction) updateTally:(id) sender { NSString *text; int total = 0; total = total + 1; text=[[NSString alloc] initWithFormat: @"%i", total]; lblTally.text = text; } I have done the necessary interface declarations for the lblTally UILabel and the updateTally method. I suspect that there is some sort of an NSString/int/%i/%@ mixup that I am making but I'm not sure how to fix it. When I run the program as it currently is it displays a 0 in the lblTally label field on the iphone. When I press the button it then displays a 1 in that field. However, if I continue to press the button - nothing happens.

    Read the article

  • Find host from ItemContainerGenerator.itemChanged Event

    - by Mohanavel
    I'm working on C# 4.0, WPF. I have three ListView, and all three control have the same ItemContainerGenerator_ItemsChanged" event. So my problem is, when ever the event triggered, i have to find the host. lst1.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); lst2.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); lst3.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e) { //TODO: Find host and proceed. **REAL Problem** // ListViewItem's Visible property has been set based on the deletion button click, // So at one place i have to get the count of rows which are visible and proceed // with related buttons enable/disable operation. }

    Read the article

  • How to solve this issue in a URL?

    - by Ayyappan.Anbalagan
    I am working on a billing project. I am passing the invoice number to another aspx page using a query parameter; i.e. /default.aspx?editid=5 is the URL. If I change the editid to 4, then the records also changes. How to solve this issue? Page 1 LinkButton InvoiceEdit = sender as LinkButton; string EditId = InvoiceEdit.CommandArgument.ToString(); Response.Redirect("edit invoice.aspx?EditId=" + EditId); Page 2 String invoiceId = Request.QueryString["InvoiceId"].ToString();

    Read the article

  • how to update database using datagridview?

    - by Sikret Miseon
    how do we update tables using datagridview? assuming the datagridview is editable at runtime? any kind of help is appreciated. Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim dbSource As String Dim ds As New DataSet Dim da As OleDb.OleDbDataAdapter Dim sql As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dbProvider = "PROVIDER=Microsoft.ACE.OLEDB.12.0;" dbSource = "Data Source = C:\record.accdb" con.ConnectionString = dbProvider & dbSource con.Open() sql = "SELECT * FROM StudentRecords" da = New OleDb.OleDbDataAdapter(sql, con) da.Fill(ds, "AddressBook") MsgBox("Database is now open") con.Close() MsgBox("Database is now Closed") DataGridView1.DataSource = ds DataGridView1.DataMember = "AddressBook" End Sub

    Read the article

  • Attempted to perform an unauthorized operation

    - by Lefteris Gkinis
    Now I use the following code: Public Function SetACL(ByVal filename As String, ByVal account As String, ByVal sender As Object, ByVal e As System.EventArgs) As Boolean Try Dim rule As FileSystemAccessRule = New FileSystemAccessRule(account, FileSystemRights.Write, AccessControlType.Allow) Dim fp As PermissionSet = New PermissionSet(Permissions.PermissionState.Unrestricted) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Read, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Write, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.PathDiscovery, filename)) fp.Assert() Dim di As DirectoryInfo = New DirectoryInfo(Path.GetDirectoryName(filename)) SetACL = False Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) security.ModifyAccessRule(AccessControlModification.Add, rule, SetACL) di.SetAccessControl(security) Return SetACL Catch ex As Exception MessageBox.Show(ex.Message, "Set Security Sub", MessageBoxButtons.OK, MessageBoxIcon.Stop) Finalize() End Try End Function The Error of 'Attempted to perform an unauthorized operation' comes when i'm trying to execute the instraction Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) Please if anybody knows why that error comes here to respond

    Read the article

  • VB.net save opened word document!

    - by comii
    Hi! I just trying to made word add-ins that gone save opened document.I made ribbon and button on it.Below is the that i use for saving word document on certain location: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Button1.Click Dim ThisApplication As Word.Application ThisApplication.ActiveDocument.SaveAs("C:\email") ThisApplication.Quit() ThisApplication= Nothing End Sub But when i click on this button i just made email.doc but that document does not contain any content of the opened document, it just made new doc file. What i am doing wrong? The event on this button need to just same as event on standard Word save button, so how i can do this?

    Read the article

  • get data from gridview without querying database

    - by frank2009
    Hi there I am new at this so please bear with me... I have managed to get the following code to work...so when I click on the "select" link in each row of the gridview, the data is transfered to other label/textbox on the webpage. So far so good, the thing is that everytime I click on select...it goes and checks on the database for the data and there is a delay of a few seconds... I was hoping that the data, since it is already visible on the gridrows, is simply "picked up" and used on other labels/textboxes...without requerying the database. Is this possible ? Thanks in advance Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Label1.Text = GridView2.SelectedRow.Cells(8).Text Label2.Text = GridView2.SelectedRow.Cells(9).Text TextBox1.Text = GridView2.SelectedRow.Cells(7).Text End Sub

    Read the article

  • getting started with qpid server

    - by London
    I'd like to get started with qpid, can anyone recommend some useful resources/links/code examples for me to study? I'm interested about java implementations?I'd like to create message sender/listener. I've already done messaging with jboss where I send the message to the queue and the listener picks it up from there, what is different with qpid? Is it the same only replacing jboss as a server with qpid or?I'm new to all of this it might sound weird when I ask it. Oh yes similar question: http://stackoverflow.com/questions/1693099/get-started-with-qpid Doesn't really help me much. Any hints would help me a lot. thank you

    Read the article

  • How do i get a directory listing for a folder on the web?

    - by JimDel
    How do I get a directory listing for a folder on the web? I'm looking to download a group of small files from a folder on the web. I can do it easily with a a single file but I'm not sure how to do it for multiple files. If there was something similar to the code below but for a folder on the web I think I can do it. private void button1_Click(object sender, EventArgs e) { DirectoryInfo di = new DirectoryInfo("c:/myFolder"); FileInfo[] rgFiles = di.GetFiles("*.*"); foreach (FileInfo fi in rgFiles) { //Do Something with each of them } } Thanks

    Read the article

  • C# TabControl - is it possible to "disable" individual TabPages?

    - by CaldonCZE
    Is it somehow possible to disable one (or more) tabs of tab control? At some point I need to make user stay on the active tab and prevent him from leaving... I know I can disable the whole TabControl component, but that disables also all components on active tab... I also tried to use the Selecting method of TabControl: private void TabControl_Selecting(object sender, TabControlCancelEventArgs e) { e.Cancel = PreventTabSwitch; } This works, prevents user from switching (if PreventTabSwitch==true), but since all tabs look active and just don't react it's confusing... There is no Enabled property for individual tab pages, so I don't know what else to do... Thanks a lot for in advance for all tips.

    Read the article

  • process incoming mail and parse out original text

    - by florin
    I have inherited a rails forum (Rails 2.3.2 I think) that alerts people of new posts/replies for the forums or threads they are watching. To make it easier for people to answer to threads I would like to enable reply-to-post, similar to basecamp and a bunch of other forums and tools out there. I would add a separator text (like "----add your reply above this line-----") in the original email. I need to: - process incoming email - extract the new text (above the separator line) - ideally strip out text like "on ... [email protected] wrote:" that is automatically added by some mail clients - identify the thread this email is referring to (either using the incoming address or the subject line) - identify the sender - post the content as new reply Any suggestions on how to get started? Any good plugins for this? I've seen many mentioning Mailman and Fetcher, are there any other and which one is the best for this little feature? Thanks!

    Read the article

  • Multiple windows services in a single project = mystery

    - by Remoh
    I'm having a bizarre issue that I haven't seen before and I'm thinking it MUST be something simple that I'm not seeing in my code. I have a project with 2 windows services defined. One I've called DataSyncService, the other SubscriptionService. Both are added to the same project installer. Both use a timer control from System.Timers. If I start both services together, they seem to work fine. The timers elapse at the appropriate time and everything looks okay. However, if I start either service individually, leaving the other stopped, everything goes haywire. The timer elapses constantly and on the wrong service. In other words, if I start the DataSyncService, the SubscriptionService timer elapses over and over. ...which is obviously strange. The setup is similar to what I've done in the past so I'm really stumped. I even tried deleting both service and starting over but it doesn't seem to make a difference. At this point, I'm thinking I've made a simple error in the way I'm defining the services and my brain just won't let me see it. It must be creating some sort of threading issue that causes one service to race when the other is stopped. Here the code.... From Program.cs: static void Main() { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new DataSyncService(), new SubscriptionService() }; ServiceBase.Run(ServicesToRun); } From ProjectInstaller.designer.cs: private void InitializeComponent() { this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); this.dataSyncInstaller = new System.ServiceProcess.ServiceInstaller(); this.subscriptionInstaller = new System.ServiceProcess.ServiceInstaller(); // // serviceProcessInstaller1 // this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem; this.serviceProcessInstaller1.Password = null; this.serviceProcessInstaller1.Username = null; // // dataSyncInstaller // this.dataSyncInstaller.DisplayName = "Data Sync Service"; this.dataSyncInstaller.ServiceName = "DataSyncService"; this.dataSyncInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic; // // subscriptionInstaller // this.subscriptionInstaller.DisplayName = "Subscription Service"; this.subscriptionInstaller.ServiceName = "SubscriptionService"; this.subscriptionInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic; // // ProjectInstaller // this.Installers.AddRange(new System.Configuration.Install.Installer[] { this.serviceProcessInstaller1, this.dataSyncInstaller, this.subscriptionInstaller}); } private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private System.ServiceProcess.ServiceInstaller dataSyncInstaller; private System.ServiceProcess.ServiceInstaller subscriptionInstaller; From DataSyncService.cs: public static readonly int _defaultInterval = 43200000; //log4net.ILog log; public DataSyncService() { InitializeComponent(); //log = LogFactory.Instance.GetLogger(this); } protected override void OnStart(string[] args) { timer1.Interval = _defaultInterval; //GetInterval(); timer1.Enabled = true; EventLog.WriteEntry("MyProj", "Data Sync Service Started", EventLogEntryType.Information); //log.Info("Data Sync Service Started"); } private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { EventLog.WriteEntry("MyProj", "Data Sync Timer Elapsed.", EventLogEntryType.Information); } private void InitializeComponent() { this.timer1 = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit(); // // timer1 // this.timer1.Enabled = true; this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed); // // DataSyncService // this.ServiceName = "DataSyncService"; ((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); } From SubscriptionService: public static readonly int _defaultInterval = 300000; //log4net.ILog log; public SubscriptionService() { InitializeComponent(); } protected override void OnStart(string[] args) { timer1.Interval = _defaultInterval; //GetInterval(); timer1.Enabled = true; EventLog.WriteEntry("MyProj", "Subscription Service Started", EventLogEntryType.Information); //log.Info("Subscription Service Started"); } private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { EventLog.WriteEntry("MyProj", "Subscription Service Time Elapsed", EventLogEntryType.Information); } private void InitializeComponent() //in designer { this.timer1 = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit(); // // timer1 // this.timer1.Enabled = true; this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed); // // SubscriptionService // this.ServiceName = "SubscriptionService"; ((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); } Again, the problem is that the timer1_elapsed handler runs constantly when only one of the services is started. And it's the handler on the OPPOSITE service. Anybody see anything?

    Read the article

  • XAML-based applications - Event Naming Conventions for C#

    - by user118190
    For event handling, I am starting to see many coders doing this: XButton.Click += OnXButtonClicked() ... void OnXButtonClicked() { ... } Where did this On_ convention come from? It just doesn't feel right in terms of methods. I am starting to see this as well and am wondering what others thought: XButton.Click += HandleXButtonClick() ... void HandleXButtonClick() { ... } When using intellisense, Visual Studio handles these like so: XButton.Click += XButton_Click; ... void XButton_Click(object sender, RoutedEventArgs e) { ... } I am seeking some advice on these naming conventions and would greatly appreciate some advice.

    Read the article

  • ASP.NET/VB/SQL: trying to insert data, getting error "no value given for required parameters"

    - by Sara
    I am pretty sure this is a basic syntax error, I am new at this and basically figuring things out by trial and error... I am trying to insert data from textboxes into an Access database, where the primary key fields in tableCourse are prefix and course_number. It keeps giving me the "no value given for one or more required parameters" error. Here is my codebehind: Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick 'Collect Data Dim myDept = txtDept.Text Dim myFirst = txtFirstName.Text Dim myLast = txtLastName.Text Dim myPrefix = txtCoursePrefix.Text Dim myNum = txtCourseNum.Text 'Define Connection Dim myConn As New OleDbConnection myConn.ConnectionString = AccessDataSource1.ConnectionString 'Create commands Dim myIns1 As New OleDbCommand("INSERT INTO tableCourse (department, name_first, name_last, prefix, course_number) VALUES (@myDept, @myFirst, @myLast, @myPrefix, @myNum)", myConn) 'Execute the commands myConn.Open() myIns1.ExecuteNonQuery() End Sub

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >