Search Results

Search found 6510 results on 261 pages for 'umesha ms'.

Page 65/261 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Linking Excel and Access

    - by Mel
    I run a sports program where i have a master roll of who is in which class in excel. I want to link this to a database in access that stores the other information about each athlete, e.g. address, parents name, school, medical details. I want to be able to add names to class in the excel speadsheet and have this automatically generate a record for that person in access. There also needs to be some failsafe for athletes that are in multiple classes. I was also doing class roles as pivot tables out of the access database so i need to code for classes and also have this allow for athletes in multiple classes/disciplines.

    Read the article

  • Datagridview error

    - by Simon
    I have two datagridviews. So for the second one, i just copy-pasted the code from the first and changed where the difference was. But i get an error at the secod data grid when i want to view the result of my sql code. Translated in english the error show something like that there was no value given to at least one required parameter. Please help! private void button1_Click(object sender, EventArgs e) { string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=save.mdb"; try { database = new OleDbConnection(connectionString); database.Open(); date = DateTime.Now.ToShortDateString(); string queryString = "SELECT zivila.naziv,(obroki_save.skupaj_kalorij/zivila.kalorij)*100 as Kolicina_v_gramih " + "FROM (users LEFT JOIN obroki_save ON obroki_save.ID_uporabnika=users.ID)" + " LEFT JOIN zivila ON zivila.ID=obroki_save.ID_zivila " + " WHERE users.ID= " + a.ToString(); loadDataGrid(queryString); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } } public void loadDataGrid(string sqlQueryString) { OleDbCommand SQLQuery = new OleDbCommand(); DataTable data = null; dataGridView1.DataSource = null; SQLQuery.Connection = null; OleDbDataAdapter dataAdapter = null; dataGridView1.Columns.Clear(); // <-- clear columns SQLQuery.CommandText = sqlQueryString; SQLQuery.Connection = database; data = new DataTable(); dataAdapter = new OleDbDataAdapter(SQLQuery); dataAdapter.Fill(data); dataGridView1.DataSource = data; dataGridView1.AllowUserToAddRows = false; dataGridView1.ReadOnly = true; dataGridView1.Columns[0].Visible = true; } private void Form8_Load(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=save.mdb"; try { database = new OleDbConnection(connectionString); database.Open(); date = DateTime.Now.ToShortDateString(); string queryString = "SELECT skupaj_kalorij " + "FROM obroki_save " + " WHERE users.ID= " + a.ToString(); loadDataGrid2(queryString); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } } public void loadDataGrid2(string sqlQueryString) { OleDbCommand SQLQuery = new OleDbCommand(); DataTable data = null; dataGridView2.DataSource = null; SQLQuery.Connection = null; OleDbDataAdapter dataAdapter = null; dataGridView2.Columns.Clear(); // <-- clear columns SQLQuery.CommandText = sqlQueryString; SQLQuery.Connection = database; data = new DataTable(); dataAdapter = new OleDbDataAdapter(SQLQuery); dataAdapter.Fill(data); dataGridView2.DataSource = data; dataGridView2.AllowUserToAddRows = false; dataGridView2.ReadOnly = true; dataGridView2.Columns[0].Visible = true; }

    Read the article

  • How to quickly analyse large MDB file

    - by Craig Johnston
    I need to know how to quickly analyse a large MDB file (about 1GB) to see which tables are causing it to be so big. Is there something will easily allow me to show a breakdown of which tables are responsible for how much data. I need to know whether it is just this one customer who is using the application differently, or whether there is genuinely a lot of data in the MDB. This MDB is currently causing the VB app to crash, and I need to know why it is so big so that I can maybe think about how to put some of the data into another 'archival' MDB. Migrating to SQL Server is not an option, unless the use of linked tables from an MDB is a realistic option.

    Read the article

  • How do I merge multiple PDB files ?

    - by blue.tuxedo
    We are currently using a single command line tool to build our product on both Windows and Linux. Si far its works nicely, allowing us to build out of source and with finer dependencies than what any of our previous build system allowed. This buys us great incremental and parallel build capabilities. To describe shortly the build process, we get the usual: .cpp -- cl.exe --> .obj and .pdb multiple .obj and .pdb -- cl.exe --> single .dll .lib .pdb multiple .obj and .pdb -- cl.exe --> single .exe .pdb The msvc C/C++ compiler supports it adequately. Recently the need to build a few static libraries emerged. From what we gathered, the process to build a static library is: multiple .cpp -- cl.exe --> multiple .obj and a single .pdb multiple .obj -- lib.exe --> a single .lib The single .pdb means that cl.exe should only be executed once for all the .cpp sources. This single execution means that we can't parallelize the build for this static library. This is really unfortunate. We investigated a bit further and according to the documentation (and the available command line options): cl.exe does not know how to build static libraries lib.exe does not know how to build .pdb files Does anybody know a way to merge multiple PDB files ? Are we doomed to have slow builds for static libraries ? How do tools like Incredibuild work around this issue ?

    Read the article

  • Exception on inserting into Access 2010 in C Sharp

    - by slao.it
    Hello, I am getting this exception when inserting into a Access 2010 database. Ex: System.Data.OleDb.OleDbException (0x80040E14): Syntax error in string in query expression ''CityName ?'. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at ReadingData.Program.Main(String[] args) in C:\Users\user\documents\visual studio 2010\Projects\ReadingData\ReadingData\Program.cs:line 238 INSERT INTO CranbrookMain (ID,BlockNo,Plot,SubPlot,Code,Type,LastName,FirstName,ServiceHome,ServiceAddress,ServiceCity,Notes) VALUES ('1','Y','37','DS','C2','O','SMITH','John','Service Inc.','520B SLATER ROAD N.W.','CityName','CityName ? ') insertSQL = "INSERT INTO CranbrookMain (ID,BlockNo,Plot,SubPlot,Code,Type,LastName," + "FirstName,ServiceHome,ServiceAddress,ServiceCity,Notes) VALUES (" + "'"+id+ "','" + blockNo + "','" + plot + "','" + subPlot + "','" + code + "','" + type + "','" + lastname + "','" + firstname + "','" + serviceHome + "','" + serviceAddress + "','" + serviceCity + "','" + notes +"')"; Console.WriteLine(); OleDbCommand cmd = new OleDbCommand(insertSQL, con); // creating query command cmd.ExecuteNonQuery(); The error occurs in cmd.ExecuteNonQuery() function call. The above SQL INSERT statement works fine if I directly execute in the Access 2010 file.

    Read the article

  • Which is better practice: complex SQL statements or Recordset manipulation in Access VBA?

    - by mazi
    I'm doing some VBA development and I found creating SQLs quite efficient way of getting everything done (selecting and updating). But I got to this stage where my SQL statements contain complex Switches and WHERE conditions where I have another Selects to update appropriate records. Therefore, I create this SQLs and I simply run it via "CurrentDb.Execute strSQL" and it does everything fine. The question is, why would I declare ADODB.connections etc, set recordsets, loop through it and manipulate the data one by one?

    Read the article

  • Using query parameter in Access report

    - by Dave
    I have a very basic access database where a query returns the sales made within a set start date and a set end date. The dates are set with two pop up boxes for the user to enter, first the start date, and then the end date. I have a report running off the back of this. How can I (using VBA) get at these dates then display them on the report - ie. the report says "Sales for Period:" and then shows the "from date" and the "to date" that the user input.

    Read the article

  • Retrieve Value Using Key From a Collection in Access 2000

    - by Mikecancook
    I know this is a simple question but it's aggravating me. If I have a key/value pair in a collection but I can't seem to get the value out using the key. I can get the key using the value but not vice versa. Is there some magical way to accomplish this? For example: Dim CycleList As Collection Dim Value as String Set CycleList = New Collection CycleList.Add 1, "Some Value" Value = CycleList(1) I've also tried CycleList.Item(1) and it's the same result, Value = 1.

    Read the article

  • How can I Export a Table in Access using VBA into a specific sheet in an Excel spreadsheet?

    - by Bryan
    I have a some tables, we will call them Table1,Table2.... and I need them to be Exported into specific spreadsheets in a macro enabled Excel File (.xlsm) that already exists. So I would need to put Table1 into Sheet2, Table2 into Sheet3... and so on. I had been doing this manually by going to the export menu in Access but it is getting monotonous so I would like to automate the process. The Excel file will already have code in each spreadsheet which would need to still be intact.

    Read the article

  • Fill in word form field with more than 255 characters

    - by user1308743
    I am trying to programmaticly fill in a microsoft word form. I am successfully able to do so if the string is under 255 chars with the following code below, however it says the string is too long if i try and use a string over 255 chars... How do I get past this limitation? If I open the word doc in word I can type in more than 255 chars without a problem. Does anyone know how to input more characters via c# code? object fileName = strFileName; object readOnly = false; object isVisible = true; object missing = System.Reflection.Missing.Value; //open doc _oDoc = _oWordApplic.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 missing, ref missing, ref missing, ref missing); _oDoc.Activate(); //write string _oDoc.FormFields[oBookMark].Result = value; //save and close oDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); _oWordApplic.Application.Quit(ref missing, ref missing, ref missing);

    Read the article

  • How to determine Jet database Engine Type programmatically

    - by MZB
    I have a program which needs to upgrade any Access (Jet) database it opens to JET Version4.x if it isn't already that version. (This enables use of SQL-92 syntax features) Upgrading is (relatively) easy. A call to the JRO.JetEngine object's CompactDatabase method (as described here) should do the trick, but before I do this I need to determine whether an upgrade is required. How do I determine the Jet OLEDB:Engine Type of an existing database? Can this be determined from an open OleDBConnection? Note: I'm talking about database versions, not Jet library versions. C# or .Net solution greatly appreciated.

    Read the article

  • Date Picker Control Not Displaying Proper Date (Access 2003)

    - by JPM
    Hi everyone, I just have a quick question. I am maintaining an app for my summer co-op position, and a new requirement came down today where the user requested to have a date control added to a form to mark the date of when an employee is "laid off". This control is enabled/disabled by a toggle button, and has its control source bound to a field that I added in the database. All the functionality has been added and tested, but.... The issue I am having is that the date picker is on a tab control (the 2nd page) and I am having problems trying to get the control to display the date that is stored in the field I created. I know the control is storing any changes made using it, but since the user asked to move the control over to the 2nd tab (it was on the first), it just shows today's date, not the date entered using the control. To make things a little more strange, if I place the control anywhere except the tab control, it seems to be working fine. I've even placed a textbox on the tab and set its control source to the database field, and it displays just fine. What gives? And I have registered the .ocx with Access, and as I mentioned before, the actual database is storing the data. Just not displaying it. Any ideas as to what I am doing wrong?

    Read the article

  • Access 2007 DAO VBA Error 3381 causes objects in calling methods to "break".

    - by MT
    ---AFTER FURTHER INVESTIGATION--- "tblABC" in the below example must be a linked table (to another Access database). If "tblABC" is in the same database as the code then the problem does not occur. Hi, We have recently upgraded to Office 2007. We have a method in which we have an open recordset (DAO). We then call another sub (UpdatingSub below) that executes SQL. This method has its own error handler. If error 3381 is encountered then the recordset in the calling method becomes "unset" and we get error 3420 'Object invalid or no longer set'. Other errors in UpdatingSub do not cause the same problem. This code works fine in Access 2003. Private Sub Whatonearth() Dim rs As dao.Recordset set rs = CurrentDb.OpenRecordset("tblLinkedABC") Debug.Print rs.RecordCount UpdatingSub "ALTER TABLE tblTest DROP Column ColumnNotThere" 'Error 3240 occurs on the below line even though err 3381 is trapped in the calling procedure 'This appears to be because error 3381 is encountered when calling UpdatingSub above Debug.Print rs.RecordCount End Sub Private Sub WhatonearthThatWorks() Dim rs As dao.Recordset set rs = CurrentDb.OpenRecordset("tblLinkedABC") Debug.Print rs.RecordCount 'Change the update to generate a different error UpdatingSub "NONSENSE SQL STATEMENT" 'Error is trapped in UpdatingSub. Next line works fine. Debug.Print rs.RecordCount End Sub Private Sub UpdatingSub(strSQL As String) On Error GoTo ErrHandler: CurrentDb.Execute strSQL ErrHandler: 'LogError' End Sub Any thoughts? We are running Office Access 2007 (12.0.6211.1000) SP1 MSO (12.0.6425.1000). Perhaps see if SP2 can be distributed? Sorry about formatting - not sure how to fix that.

    Read the article

  • Problem evaluating NULL in an IIF statement (Access)

    - by Mohgeroth
    Item in the recordset rstImportData("Flat Size") is = Null With that, given the following statement: IIF(IsNull(rstImportData("Flat Size")), Null, cstr(rstImportData("Flat Size"))) Result: Throws error 94: Invalid use of Null If I change the statement by removing the type conversion upon a false comparison: IIF(IsNull(rstImportData("Flat Size")), Null, 0) Result: Null It returns Null as it should have the first time. It appears that I cannot do a type conversion in an IIF if the value passed in should ever be null even if it passes an IIF test, it still attempts to evaluate it at both the true and false answer. The only reason I'm using IIF like this is because I have a 25 line comparison to compare data from an Import against a matching record in a database to see if I need to append the prior to history. Any thoughts? The way data is imported there will be null dates and where the spreadsheet import is in a string format I must convert either side to the other to compare the values properly but if either side is null this exception occurs :(

    Read the article

  • Selecting rows without a value for Date/Time columns

    - by Ross
    I'm running this query: SELECT TOP 1 [DVD Copy].[Stock No] FROM [DVD Copy] WHERE [DVD Copy].[Catalogue No] =[Forms]![New Rental]![Catalogue No] And [Issue Date] = Null; Which works fine without the null check for Issue Date. I'm trying to select rows without a Date in the Issue Date column. Is Null the wrong kind of value to use for here?

    Read the article

  • Subquery max sequence number

    - by Andy Levesque
    I'm hesitant to ask because I'm sure it's out there, but I just can't seem to come up with the keywords to find the answer. I'm stepping outside my boundaries by starting with subqueries (normally an Access user). I have a query that has TECH_ID, SEQ_NBR, and PELL_FT_AWD_AMT SELECT ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID, ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR, ISRS_V_NEED_ANAL_RESULT_PARENT.PELL_FT_AWD_AMT, ISRS_V_NEED_ANAL_RESULT_PARENT.SEQ_NBR FROM ISRS_V_NEED_ANAL_RESULT_PARENT GROUP BY ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID, ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR, ISRS_V_NEED_ANAL_RESULT_PARENT.PELL_FT_AWD_AMT, ISRS_V_NEED_ANAL_RESULT_PARENT.SEQ_NBR HAVING (((ISRS_V_NEED_ANAL_RESULT_PARENT.AWD_YR)="2013")) ORDER BY ISRS_V_NEED_ANAL_RESULT_PARENT.TECH_ID; What I want to return is add a subquery that selects only the max SEQ_NUM for each record, but I can't seem to get the syntax right. In the past I would cheat and have a separate query that first gave me the TECH_ID and max SEQ_NUM, and then have a second query that use the original table and the first query in a join to get the rest. How can I do this in one query? Example: TECH_ID SEQ_NUM PELL 1 1 4000 1 2 4000 1 3 5000 Using just the max of the sequence number still returns: 1; 2; 4000 and 1; 3; 5000 when I'm only wanting the latter.

    Read the article

  • VSTO Word ContentControls, Y U No have Name property?

    - by System.Cats.Lol
    When you add a VSTO (not Word native) content control, you specify the name: controls.AddContentControl(wordRange, "foo", wdType); Where controls is the VSTO (extended) Document.Controls collection. You can later look up the control by name: ContentControl myContentControl = controls["foo"]; So why in the world is there no Name property for ContentControl? (or ContentControlBase, or any of the other derivatives). I'm implementing a wrapper class for the Document.Controls property that lets you add or iterate the content controls. When iterating the underlying Document.Controls, there's no way to look up the name of each control. (We need it to return an instance of our ContentControl wrapper). So currently I'm doing this in our ContentControls wrapper class: public IEnumerator<IContentControl> GetEnumerator() { System.Collections.IEnumerator en = this.wordControls.GetEnumerator(); while (en.MoveNext()) { // VSTO Document.Controls includes all managed controls, not just // VSTO ContentControls; return only those. if (en.Current is Microsoft.Office.Tools.Word.ContentControl) { // The control's name isn't stored with the control, only when it was added, // so use a placeholder name for the wrapper. yield return new ContentControl("Unknown", (Microsoft.Office.Tools.Word.ContentControl)en.Current); } } } I'd prefer to not have to resort to keeping a map of names-to-wrapper-objects in our ContentControls object. Can anyone tell me how to get the control's name (the name parameter that was passed to Controls.Add()?

    Read the article

  • In what language was MSDOS originally written in?

    - by nebukadnezzar
    In what language was MSDOS originally written in? The Wikipedia Article implies either C, QBasic or Pascal, but: * C was invented to write UNIX, so I don't believe it was used to write MSDOS * Pascal seems popular to teach programming, but not really popular to write Operating systems in * QBasic didn't seem to be very popular for Operating Systems at the time MSDOS was developed (or was *BASIC ever very popular to write Operating Systems in it?) Except these three languages there is also Assembly, but I assume that Microsoft already switched from Assembly to a "higher" level language? Since C was originally invented for UNIX, I still wouldn't think Microsoft is using C... although the Microsoft API is written in C (I find this kind-of oxymoronic, actually). Can anyone enlighten me on this topic?

    Read the article

  • How to transform vertical table into horizontal table?

    - by avivo
    Hello, I have one table Person: Id Name 1 Person1 2 Person2 3 Person3 And I have its child table Profile: Id PersonId FieldName Value 1 1 Firstname Alex 2 1 Lastname Balmer 3 1 Email [email protected] 4 1 Phone +1 2 30004000 And I want to get data from these two tables in one row like this: Id Name Firstname Lastname Email Phone 1 Person1 Alex Balmer [email protected] +1 2 30004000 What is the most optimized query to get these vertical (key, value) values in one row like this? Now I have a problem that I done four joins of child table to parent table because I need to get these four fields. Some optimization is for sure possible. I would like to be able to modify this query in easy way when I add new field (key,value). What is the best way to do this? To create some StoreProcedure? I would like to have strongly types in my DB layer (C#) and using LINQ (when programming) so it means when I add some new Key, Value pair in Profile table I would like to do minimal modifications in DB and C# if possible. Actually I am trying to get some best practices in this case.

    Read the article

  • How to use a c# datagridview to update a database file just like Access does?

    - by mackeyka
    I have googled everywhere and I am finally giving up and asking here. I am working in Visual Studio 2010 with C#. I have set up a form with a datagridview connected to a MSSQL database and I need to save changes made in the datagridview back to the physical database. I am having some success but I think that I am going about some of it completely wrong because I can not get it to save consistently. What I really want is for the updates to work just like they do when working with Access. When I edit a row in the datagridview and then leave that row, either by selecting another row or by selecting some other control on the form or even by changing to another form or quitting the application the row should be automatically pdated to the physical database. The first part of this question I think is, what is the proper event to use to trigger the save and then second what methods should be used to actually write the data to the database?

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >