Search Results

Search found 11778 results on 472 pages for 'mark ms smith'.

Page 79/472 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • How to programmatically set the text of a cell of database in VB.Net?

    - by manuel
    I have a Microsoft Access database file connected to VB.NET. In the database table, I have a 'No.' and a 'Status' column. Then I have a textbox where I can input an integer. I also have a button, which will change the data cell in 'Status' where 'No.' = txtTitleNo.Text(), when I click it. Let's say I want the 'Status' cell to be changed to "Reserved". What codes should I put in the BtnReserve_Click? Here is the code: Public Class theForm Dim con As New OleDb.OleDbConnection Dim ds As New DataSet Dim daTitles As OleDb.OleDbDataAdapter Private Sub theForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\db1.mdb" con.Open() daTitles = New OleDb.OleDbDataAdapter("SELECT * FROM Titles", con) daTitles.Fill(ds, "Titles") DataGridView1.DataSource = ds.Tables("Titles") DataGridView1.AutoResizeColumns() End Sub Private Sub BtnReserve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnReserve.Click Dim daReserve As OleDb.OleDbCommand For i As Integer = 1 TReservedo DataGridView1.RowCount() If i = Val(txtTitleNo.Text()) Then daReserve = New OleDb.OleDbCommand("UPDATE Titles SET Status = 'Reserved' WHERE No = '" & i & "'", con) daReserve.ExecuteNonQuery() End If Next Dim cb As New OleDb.OleDbCommandBuilder(daTitles) daTitles.Update(ds, "Titles") End Sub This code still does not change the 'Status'. What should I do?

    Read the article

  • Grabbing "last saved by" metadata from access '03 file to excel '03 in VBA

    - by Spacious
    So I am in Excel trying to read the last saved metadata from an Access database, but I cannot figure out how on earth to do this. If I use environ$("username") it will give my the last saved information for the excel document where I am coding, not the access db that I want it to grab from. Excel has a built in function for grabbing username data, but I cannot find one for access. How can I do this?! Any help is greatly appreciated!

    Read the article

  • clearing an entire column in access

    - by I__
    is there a way to clear an entire column in a datasheet in access? i can just right click on it and delete it but that will affect the structure, i just need to clear all the records. how do i do this? perhaps the question i should be asking is how do i clear the entire contents of a datasheet in access?

    Read the article

  • Conditional formatting in Access

    - by every_answer_gets_a_point
    I have a datasheet that looks like this: ID name_ 1 2 3 4 1 name1 x 0 0 0 2 name2 0 x 0 0 3 name3 0 0 x 0 4 name4 0 0 0 x I have rectangles on a report that correspond to this datasheet. When the report opens, I need the rectangles to be colored red according to the data. For example, in the name1 row where there is an x in the 1 column, I need the specific rectangle corresponding to this (name1, 1) to be colored red. Here is the result that I need: x x x x (where x is a rectangle that is red) Perhaps the best place to place this code would be in ON LOAD event of the report, but i am not sure exactly. Can you please suggest to me some code that would turn the specified rectangles red according to the data?

    Read the article

  • Display and Use Advanced Find for Product Subscriptions by Account in Microsoft CRM 4.0

    - by Chris
    By default when viewing an account in edit mode you have access to Opportunities, Invoices, and Quotes which contain the products being shopped by the account and/or the sales department. I'm trying to determine where to store, display, and use the products that an account has a subscription too. I may not understand the implementation but it seems that there should be "Products" option directly off the root Account management window that will show the user all the products the account has purchased. We are trying to integrate this with our production tracking system where product sales can originate from other channels that will not flow through CRM first. This product subscription does not fit into the Opportunity, Quote, or Invoice model because they are confirmed recurring sales that were automatically purchased via tools like a Public Website, Portal, etc. By enabling this tracking in CRM we can use the advanced find feature to facilitate follow up sales and marketing efforts. Example: Find everyone who is subscribed to model A, so we can notify them of a new holiday campaign where they can get 10% off on all add-ons. It's my assumption that this is a common scenario, however I'd like to better understand how to approach this within the world of Microsoft CRM. Thank you in advance.

    Read the article

  • Assign value to HTML textbox from JSP

    - by prakash_d22
    Hello I am creating a web page to add some information about given product.I need to enter id,name,description and image as information.I need the id to be auto generated.I am using jsp and database as access.I am fetching the count(*)+1 value from database and assigning to my html text box but its showing as null.can i get some help? Code: <body> <%@page import="java.sql.*"%> <%! String no; %> <% try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:pd"); ResultSet rs = null; Statement st = con.createStatement(); String sql = ("select count(*)+1 from products"); st.executeUpdate(sql); while (rs.next()) { no=rs.getString("count(*)+1"); } rs.close(); st.close(); con.close(); } catch(Exception e){} %> <Form name='Form1' action="productcode.jsp" method="post"> <table width="1024" border="0"> <tr> <td width="10">&nbsp;</td> <td width="126">Add Product: </td> <td width="277">&nbsp;</td> <td width="583">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>Product Id:</td> <td><label> <input type="text" name="id" value="<%= no%>"/> </label></td> <td>&nbsp;</td> .... and so on

    Read the article

  • Creating a border around cells with the same value.

    - by Liam
    I have a table like the one below. How can I get Excel to put borders around groups with the same number in the 4th column so that there is a border around the groups. I was thinking conditional formatting could do it but I can't think how. So I think the only option is a macro. Could anybody help? 1 64436 549419 1 2 64437 549420 1 3 64438 549421 1 4 64439 549422 1 5 64440 549423 1 6 64441 549424 1 7 64442 549425 1 8 64443 549426 1 9 64444 549427 1 10 64445 549428 1 11 64446 549429 1 12 64447 549430 1 13 64448 549431 2 14 64449 549432 2 15 64450 549433 2 16 64451 549434 2 17 64452 549435 2 18 64453 549436 2 19 64454 549437 2 20 64455 549438 2 21 64456 549439 2 22 64457 549440 4 23 64458 549441 4 24 64459 549442 5 25 64460 549443 5 26 64461 549444 5 27 64462 549445 5 28 64463 549446 5 29 64464 549447 5 30 64465 549448 6 31 64466 549449 6 32 64467 549450 6 33 64468 549451 6 34 64469 549452 6 35 64470 549453 6 36 64471 549454 6 37 64472 549455 9 38 64473 549456 9 39 64474 549457 9

    Read the article

  • Issues querying Access '07 database in C#

    - by Kye
    I'm doing a .NET unit as part of my studies. I've only just started, with a lecturer that as kinda failed to give me the most solid foundation with .NET, so excuse the noobishness. I'm making a pretty simple and generic database-driven application. I'm using C# and I'm accessing a Microsoft Access 2007 database. I've put the database-ish stuff in its own class with the methods just spitting out OleDbDataAdapters that I use for committing. I feed any methods which preform a query a DataSet object from the main program, which is where I'm keeping the data (multiple tables in the db). I've made a very generic private method that I use to perform SQL SELECT queries and have some public methods wrapping that method to get products, orders.etc (it's a generic retail database). The generic method uses a separate Connect method to actually make the connection, and it is as follows: private static OleDbConnection Connect() { OleDbConnection conn = new OleDbConnection( @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Temp\db.accdb"); return conn; } The generic method is as follows: private static OleDbDataAdapter GenericSelectQuery( DataSet ds, string namedTable, String selectString) { OleDbCommand oleCommand = new OleDbCommand(); OleDbConnection conn = Connect(); oleCommand.CommandText = selectString; oleCommand.Connection = conn; oleCommand.CommandType = CommandType.Text; OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = oleCommand; adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; adapter.Fill(ds, namedTable); return adapter; } The wrapper methods just pass along the DataSet that they received from the main program, the namedtable string is the name of the table in the dataset, and you pass in the query you wish to make. It doesn't matter which query I give it (even something simple like SELECT * FROM TableName) I still get thrown an OleDbException, stating that there was en error with the FROM clause of the query. I've just resorted to building the queries with Access, but there's still no use. Obviously there's something wrong with my code, which wouldn't actually surprise me. Here are some wrapper methods I'm using. public static OleDbDataAdapter GetOrderLines(DataSet ds) { OleDbDataAdapter adapter = GenericSelectQuery( ds, "orderlines", "SELECT OrderLine.* FROM OrderLine;"); return adapter; } They all look the same, it's just the SQL that changes.

    Read the article

  • Is there a size limitation for an Access DB destination in SSIS?

    - by Adam V
    I'm creating an SSIS package, which will read through a user's SQL database and populate the tables in an Access database. However, for the largest user databases, I start getting errors around the time the Access file reaches approx. 2 GB. Has anyone run into this problem? Is this a size limitation for this operation? More information: I'm getting the error code 0xC020907B, but no additional information that I can see. Error: 0xC0209029 at , [733]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (746)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (746)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

    Read the article

  • How to retrieve last primary Id from mdb's table?

    - by William
    I got table with next columns: Id, Name, Age, Class I am trying to insert new row in db like this: INSERT INTO MyTable (Name, Age, Class) VALUES (@name, @age, @class) And get an exeption: "Index or primary key cannot contain a Null value." The question is how to add a new row without knowing next primary Id, or maybe there is a way to get this Id from the table with the help of another query ?

    Read the article

  • Microsoft Access vs Native SQL

    - by ktm5124
    Hypothetical: Let's say you are writing complex queries to a database and it is very important that the data you extracted is the correct result set (e.g., that you didn't mess up a JOIN by not using all the correct keys, and all the other things that can go wrong, et cetera). What would you rather use to do this? Would you write the query using Microsoft Access and its Design View, or would you write it in native SQL using a SQL IDE? What is the better professional choice? Thanks in advance your feedback!

    Read the article

  • Begin Viewing Query Results Before Query Ends

    - by Frank Developer
    OK, so say I have a table with 500K rows, then I ad-hoc query with unsupported indexing which requires a full table scan. I would like to immediately view the first rows returned while the full table scan continues. Then I want to scroll thru the next results. In the meantime, I would like to display the progress of the table scan, example: "SEARCHING.. FOUND 23 OF 500,000 ROWS SO FAR". If I scroll too far ahead, I want to display a message like: "REACHED LAST ROW IN LOOK-AHEAD BUFFER.. QUERY HAS NOT COMPLETED".. Can this be done? Maybe like: spawn/exec, declare scroll cursor, open, fetch, etc.?

    Read the article

  • SQL not yielding expected results

    - by AnonJr
    I have three tables related to this particular query: Lawson_Employees: LawsonID (pk), LastName, FirstName, AccCode (numeric) Lawson_DeptInfo: AccCode (pk), AccCode2 (don't ask, HR set up), DisplayName tblExpirationDates: EmpID (pk), ACLS (date), EP (date), CPR (date), CPR_Imported (date), PALS (date), Note The goal is to get the data I need to report on all those who have already expired in one or more certification, or are going to expire in the next 90 days. Some important notes: This is being run as part of a vbScript, so the 90-day date is being calculated when the script is run. I'm using 2010-08-31 as a placeholder since its the result at the time this question is being posted. All cards expire at the end of the month. (which is why the above date is for the end of August and not 90 days on the dot) A valid EP card supersedes ACLS certification, but only the latter is required of some employees. (wasn't going to worry about it until I got this question answered, but if I can get the help I'll take it) The CPR column contains the expiration date for the last class they took with us. (NULL if they didn't take any classes with us) The CPR_Imported column contains the expiration date for the last class they took somewhere else. (NULL if they didn't take it elsewhere, and bravo for following policy) The distinction between CPR classes is important for other reports. For purposes of this report, all we really care about is which one is the most current - or at least is currently current. If I have to, I'll ignore ACLS and PALS for the time being as it is non-compliance with CPR training that is the big issue at the moment. (not that the others won't be, but they weren't mentioned in the last meeting...) Here's the query I have so far, which is giving me good data: SELECT iEmp.LawsonID, iEmp.LastName, iEmp.FirstName, dept.AccCode2, dept.DisplayName, Exp.ACLS, Exp.EP, Exp.CPR, Exp.CPR_Imported, Exp.PALS, Exp.Note FROM (Lawson_Employees AS iEmp LEFT JOIN Lawson_DeptInfo AS dept ON dept.AccCode = iEmp.AccCode) LEFT JOIN tblExpirationDates AS Exp ON iEmp.LawsonID = Exp.EmpID WHERE iEmp.CurrentEmp = 1 AND ((Exp.ACLS <= #2010-08-31# AND Exp.ACLS IS NOT NULL) OR (Exp.CPR <= #2010-08-31# AND Exp.CPR_Imported <= #2010-08-31#) OR (Exp.PALS <= #2010-08-31# AND Exp.PALS IS NOT NULL)) ORDER BY dept.AccCode2, iEmp.LastName, iEmp.FirstName; After perusing the result set, I think I'm missing some expiration dates that should be in the result set. Am I missing something? This is the sucky part of being the only developer in the department... no one to ask for a little help.

    Read the article

  • IN 'mytextfile.txt' syntax - access

    - by I__
    i would like to use this syntax to update a table in access based on data from a txtfile. fenton in his comments on this answer: http://stackoverflow.com/questions/2992168/read-text-file-line-by-line-and-insert-update-values-in-table/2992337#2992337 said that this is possible and i would like to see the exact syntax please

    Read the article

  • Copy of Access mdb database being updated by live database

    - by James
    I'm trying to compute statistics for data held in an Access .mdb database. In order to avoid interfering with the live database, I'm working from a copy which I made by simply using copy-paste in Windows Explorer. The copy resides in the same directory, but with a different name. I'm using R and RODBC to connect to the copy of the file. The strange thing is that new data that is being updated on the original live database is appearing in my queries. This is despite the file timestamps of the copy not changing at all. It is also causing some slowdown in the live database. My understanding is that the .mdb files are standalone, or is this not the case? Should I have copied the database in a different way?

    Read the article

  • Inserting new argument to table through search form of another table

    - by owca
    In my database I have a form for searching products (fields : id, name, manufacturer_id[set to display manufacturer's name], category_id, price). I would like to have the ability of adding manufacturers through this form. So I've created vba script but it does not work. Still when I enter new name it gives me prompt to "Select element from the list". What am I doing wrong ? Private Sub manufacturer_id_NotInTheList(NewData As String, Response As Integer) Dim strSQL As String, strInfo As String strInfo = "Manufacturer " & NewData & " is not on the list." & vbCrLf & "Add?" If MsgBox(strInfo, vbYesNo + vbQuestion, "Element not on the list") = vbYes Then strSQL = "INSERT INTO manufacturer (name, country, id_distributor) VALUES ('" & NewData & "','Undefined', '0');" DoCmd.SetWarnings (False) DoCmd.RunSQL strSQL Response = acDataErrAdded Else Response = acDataErrContinue NewData = "" Me.manufacturer_id.Text = "" End If End Sub

    Read the article

  • Accessing an Access DB from Outlook via VBA

    - by camastanta
    Hi The situation: In Outlook I get a message from a server. The content of the message needs to be put into an Access db. But, there may not exist another message with the same date. So, I need to look into a db if there is already a message with the same date and time. If there exists one, then it needs to be replaced and otherwise the message needs to be added to the database. The database contains a list of current positions from the vehicles on the road. The problem: I have problems to compare a date time with a date time in an Access DB via VBA. The query I use returns no records but there is a record in the database. This is the query I use: adoRS.Open "SELECT * FROM currentpositions WHERE ((currentpositions. [dateLT])=" & "#" & date_from_message & "#" & ")", adoConn, adOpenStatic, adLockOptimistic Second I need to now what the result is of that query. How can I determine the number of records that my query gives me? Thanks camastanta

    Read the article

  • ExecuteNonQuery: Connection property has not been initialized

    - by 20151012
    I get an error in my code: The error point at dbcom.ExecuteNonQuery();. Code(connection) public admin_addemp() { InitializeComponent(); con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\EMPS.accdb;Persist Security Info=True"); con.Open(); ds.Tables.Add(dt); ds.Tables.Add(dt2); } Code (Save button) private void save_btn_Click(object sender, EventArgs e) { OleDbCommand check = new OleDbCommand(); check.Connection = con; check.CommandText = "SELECT COUNT(*) FROM employeeDB WHERE ([EmployeeName]=?)"; check.Parameters.AddWithValue("@EmployeeName", tb_name.Text); if (Convert.ToInt32(check.ExecuteScalar()) == 0) { dbcom2 = new OleDbCommand("SELECT EmployeeID FROM employeeDB WHERE EmployeeID='" + tb_id.Text + "'", con); OleDbParameter param = new OleDbParameter(); param.ParameterName = tb_id.Text; dbcom.Parameters.Add(param); OleDbDataReader read = dbcom2.ExecuteReader(); if (read.HasRows) { MessageBox.Show("The Employee ID '" + tb_id.Text + "' already exist. Please choose another Employee ID."); read.Dispose(); read.Close(); } else { string q = "INSERT INTO employeeDB (EmployeeID, EmployeeName, IC, Address, State, " + " Postcode, DateHired, Phone, ManagerName) VALUES ('" + tb_id.Text + "', " + " '" + tb_name.Text + "', '" + tb_ic.Text + "', '" + tb_add1.Text + "', '" + cb_state.Text + "', " + " '" + tb_postcode.Text + "', '" + dateTimePicker1.Value + "', '" + tb_hp.Text + "', '" + cb_manager.Text + "')"; dbcom = new OleDbCommand(q, con); dbcom.ExecuteNonQuery(); MessageBox.Show("New Employee '" + tb_name.Text + "'- Successfuly Added."); } } else { MessageBox.Show("Employee name '" + tb_name.Text + "' already added into the database"); } ds.Dispose(); } I'm using Microsoft Access 2010 as my database and this is stand alone system. Please help me.

    Read the article

  • Closing a process that open in code

    - by AmirHossein
    I create a WordTemplate with some placeholders for field,in code I insert value in this placeholders and show it to user. protected void Button1_Click(object sender, EventArgs e) { string DocFilePath = ""; //string FilePath = System.Windows.Forms.Application.StartupPath; object fileName = @"[...]\asset\word templates\FormatPeygiri1.dot"; DocFilePath = fileName.ToString(); FileInfo fi = new FileInfo(DocFilePath); if (fi.Exists) { object readOnly = false; object isVisible = true; object PaperNO = "PaperNO"; object PaperDate = "PaperDate"; object Peyvast = "Peyvast"; object To = "To"; object ShoName = "ShoName"; object DateName = "DateName"; Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref isVisible, ref missing, ref missing, ref missing); WordApp.ActiveDocument.FormFields.get_Item(ref PaperNO).Result = TextBox_PaperNO.Text; string strPaperDate = string.Format("{0}/{1}/{2}", PersianDateTimeHelper.GetPersainDay(DateTimePicker_PaperDate.SelectedDate), PersianDateTimeHelper.GetPersainMonth(DateTimePicker_PaperDate.SelectedDate), PersianDateTimeHelper.GetPersainYear(DateTimePicker_PaperDate.SelectedDate)); WordApp.ActiveDocument.FormFields.get_Item(ref PaperDate).Result = strPaperDate; WordApp.ActiveDocument.FormFields.get_Item(ref Peyvast).Result = TextBox_Peyvast.Text; WordApp.ActiveDocument.FormFields.get_Item(ref To).Result = TextBox_To.Text; ; WordApp.ActiveDocument.FormFields.get_Item(ref ShoName).Result = TextBox_ShoName.Text; string strDateName = string.Format("{0}/{1}/{2}", PersianDateTimeHelper.GetPersainDay(DateTimePicker_DateName.SelectedDate), PersianDateTimeHelper.GetPersainMonth(DateTimePicker_DateName.SelectedDate), PersianDateTimeHelper.GetPersainYear(DateTimePicker_DateName.SelectedDate)); WordApp.ActiveDocument.FormFields.get_Item(ref DateName).Result = strDateName; aDoc.Activate(); WordApp.Visible = true; aDoc = null; WordApp = null; } else { MessageBox1.Show("File Not Exist!"); } it work good and successfully! but when a user close the Word,her Process not closed and exists in Task Manager Process list. this process name is WINWORD.exe I know that I can close process whit code [process.Kill()] but I don't know which process that I should to kill. if I want to kill all process with name [WINWORD.exe] all Word window closed.but I want to close specific Word window and kill process that I opened. How to do it?

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >