Search Results

Search found 11822 results on 473 pages for 'ms word'.

Page 121/473 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Very difficult SQL query

    - by db666
    For the following table definitions: Name Null? Type Comments ------------------------------- -------- ---- ------------------------------------ ENUM NOT NULL NUMBER(4) ENUM should not exceed a length of 4. ENAME CHAR(15) ADDRESS CHAR(25) ADDRESS should not exceed 25 characters. SALARY NUMBER(5) OFFICE CHAR(4) DNUM NOT NULL NUMBER(4) Department which this employee belongs to department Name Null? Type Comments ------------------------------- -------- ---- ------------------------------------- DNUM NOT NULL NUMBER(4) DMGR NOT NULL NUMBER(4) Department manager DNAME NOT NULL CHAR(15) project Name Null? Type Comments ------------------------------- -------- ---- ------------------------------------- PNUM NOT NULL NUMBER(4) PMGR NOT NULL NUMBER(4) Project manager PTITLE NOT NULL CHAR(15) emp_proj Name Null? Type ------------------------------- -------- ---- PNUM NOT NULL NUMBER(4) ENUM NOT NULL NUMBER(4) I have to write SQL query which will find the names of employees who do not share an office but work on the same project, and have different salaries... I've spent last three days trying to figure out something, but no idea as far. I will appreciate any advice.

    Read the article

  • Entering Complex Data into Access

    - by DataMakesMeCrazy
    Fairly new to Access and trying to do something that seems simple, but may be very complex. I want to create a database of projects, each project has several phases (ie proposal, marketing, etc) and that will allow for multiple employees to work on a single project. Ie Bob and John are working on project number 102. From here, i would like to enter the forecasted start and end dates for each phase of the project, and enter the forecasted number our hours each employee will be allowed to work on that phase of that project ie. Project - Employee - Phase - Start - End - (list weeks) 102 - Bob - Marketing - 12-May-10 - 21-May-10 - 3 - 5 (3 hours first week, 5 hours the second) and so on Basically would all this data be on one table, or several? And can access dynamically show the weeks between the start and end date so that i can input the hours? I feel this database will become severely complicated :S Thanks, J

    Read the article

  • MSAccess Change Date Value Before Validation

    - by sisdog
    In a grid I have a date/time field where I would like the user to be able to type in short-hand formats for dates and times. For example, if they type in "435p" and then focus off of the cell they get the message "The value you entered isn't valid for this field.". Instead, I want to trap a pre-validationevent and change it to "4:35pm" for them. What event can I use? I've tried: LostFocus & BeforeUpdate: too late (validation fires before event) Dirty & OnChange: too early (they haven't left the cell yet) Or is there a way to turn off the native validation rule that is checking for date formats?

    Read the article

  • How to have an excel addin read rows from a worksheet until no more data?

    - by user169867
    I've started writing a Com addin for Excel 2003 using C#. I'm looking for a code example showing how to read in cell data from the active worksheet. I've seen that you can write code like this: Excel.Range firstCell = ws.get_Range("A1", Type.Missing); Excel.Range lastCell = ws.get_Range("A10", Type.Missing); Excel.Range worksheetCells = ws.get_Range(firstCell, lastCell); to grab a range of cells. What I could use help with is how to read the cell data when you don't know how many rows of data there are. I may be able to determine the starting row that the data will be begin at, but there will be an unkown number of rows of data to read. Could someone provide me w/ an example of how to read rows from the worksheet until you come across a row of empty cells? Also does anyone know how to grab the range of cells the user has selected? Any help would be greatly appreciated. This seems like a powerful dev tool, but I'm having trouble finding detailed documentation to help me learn it :)

    Read the article

  • access: creating a grid for a report

    - by every_answer_gets_a_point
    i will be printing the access report. the report will not be printed a regular white people. it will be printed on top of a paper with checkboxes and fields on it. i need those checkboxes and fields to be printed on according to the access data. are there any libraries for access that make this easier? is there a feature that will help to print on specific coordinates?

    Read the article

  • Access Question

    - by kralco626
    I have a record set for inspections of many peices of equipment. The four cols of interest are equip_id,month,year,myData. My requirment is to have EXACTLY ONE Record per month for each peice of equipment. I have a quiery that makes the data unique over equip_id,month,year. So there is no more than one record for each month/year for a peice of equipment. But now I need to simulate data for the missing month. I want to simply go back in time to get the last peice of my data. So that may seem confusing, so i'll show by example. Given this: equip_id month year myData 1 1 2010 500 1 2 2010 600 1 5 2010 800 2 2 2010 300 2 4 2010 400 2 6 2010 500 I want this: equip_id month year myData 1 1 2010 500 1 2 2010 600 1 3 2010 600 1 4 2010 600 1 5 2010 800 2 2 2010 300 2 3 2010 300 2 4 2010 400 2 5 2010 400 2 6 2010 500 Notice that im filling in missing data with the data from the month ( or two months etc.) before. Also note that if the first record for equip 2 is in 2/2010 than I don't need a record for 1/2010 even though I have one for equip 1. I just need exactly one record for each month/year for each peice of equipment. So if the record does not exsist I just want to go back in time and grab the data for that record. Thanks!!!

    Read the article

  • Any recommended VC++ settings for better PDB analysis on release builds

    - by Brian R. Bondy
    Are there any VC++ settings I should know about to generate better PDB files that contain more information? I have a crash dump analysis system in place based on the project crashrpt. Also, my production build server has the source code installed on the D:\, but my development machine has the source code on the C:\. I entered the source path in the VC++ settings, but when looking through the call stack of a crash, it doesn't automatically jump to my source code. I believe if I had my dev machine's source code on the D:\ it would work.

    Read the article

  • Access as a front-end to SQL Server - ADO vs DAO?

    - by webworm
    I have a project that will be using Access 2003 as the font-end and the data being stored in SQL Server. Access will connect to SQL Server via linked tables with all the database logic (stored procedures, views) within SQL Server. Given this setup, would it be better to use ADO or DAO within Access? Is it just a matter of preference or is one more suited to Access as a font-end and SQL Server as the data store? Especially when using linked tables. Thanks.

    Read the article

  • sequence of events in ACCESS

    - by I__
    what is the proper way of doing the following: getting DATE as user input running a query generating a report that uses the query this is the solution i was thinking: have a form that takes user input run the query open the report what is the correct way of doing this?

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >