User Profile

Collapse

Profile Sidebar

Collapse
sampalmer21
sampalmer21
Last Activity: Jun 15 '08, 12:46 AM
Joined: Feb 11 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Accessing SQL Database from C# Without SQL Server

    Is it at all possible to access a sql database, whether reading it or storing values to it, without having sql server installed or running as a process in the background? Perhaps this can be done using SMO?

    I ask this question because my client does not want my application to install any sql rdbms (sql server, mysql, db2 etc.) on their machine. So is there a way to process data directly to a database file such as a Sql Server .mdf...
    See more | Go to post

  • sampalmer21
    started a topic Calling existing C functions with JNI
    in Java

    Calling existing C functions with JNI

    I have a dll containing c functions which I cannot edit in any way. How do I call those functions using JNI without having to add the java generated header files/functions into the c file?
    See more | Go to post

  • Selecting distinct values from joined table

    Hi,

    I want to join two tables together and only select the rows that don't have the same customer first name and last name (see my code below). When I run my code with the DISTINCT keyword, it still returns me all of the rows probably because it requires each column to be the same in order to find distinct rows, but I want the rows just as long as the customer first and last names are different from other customers:

    ...
    See more | Go to post

  • Thank You Plater!

    You were right in that I did not set the adapter.UpdateC ommand property. This property has to be set to the builder.GetUpda teCommand() value, for example:

    adapter.UpdateC ommand = builder.GetUpda teCommand();
    See more | Go to post

    Leave a comment:


  • But doesn't the SqlCommandBuild er automatically generate those commands. If I delete the SqlCommandBuild er object, then I get a NullReferenceEx ception when I run adapter.Update( DataTable) which implies that it was supplying the commands for the adapter in the first place. So I'm still not sure about why the database doesn't update.
    See more | Go to post

    Leave a comment:


  • Unable to update database with DataGridView values

    Hi,

    If I update a cell in the DataGridView control, I use the DataAdapter.Upd ate(DataTable) method to update the database, but when I restart the application my changes are not in the database. Anyone have an idea? Here is my code:

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    ...
    See more | Go to post

  • sampalmer21
    started a topic Winforms Data Binding
    in .NET

    Winforms Data Binding

    Using visual studio 2005, there are built in mechanisms for data binding such as using the DataGrid control and connecting it to a data source which would then produce a TableAdapter object and a BindingSource object, this would then allow data to be updated and displayed on the DataGrid control.
    Much of the communication between the database and DataGrid control is happening behind the scenes using the TableAdapter, therefore is it bad practice...
    See more | Go to post

  • sampalmer21
    started a topic Using Data Binding vs SqlCommand - C#
    in .NET

    Using Data Binding vs SqlCommand - C#

    Hi,
    I'm creating a database application using c# and ado.net with winforms controls. In sql there is a data type called money which stores values in the format xx.xxxx, this is not in the typical currency fashion of $xx.xx, therefore I use the following sql command and ADO.NET's DataReader class to convert the sql money format to a currency format before displaying it on a textbox control:

    SELECT
    Qty,
    ...
    See more | Go to post

  • How to determine if database and table exists using ADO.NET

    Is there a way I can find out if a database I have created exists in the sql server using ado.net methods? How about determining if a table exists, or any other database object for that matter?

    The reason I wish to know this is so that my application can recreate the database or tables if they get deleted by the user.
    See more | Go to post

  • sampalmer21
    started a topic Constraints in ADO.NET
    in .NET

    Constraints in ADO.NET

    Using ado.net I can pass commands to sql server with the SqlCommand class. I could use this class to pass in a sql command to set a foreign key constraint.

    I could also use the ForeignKeyConst raint class in ADO.NET to set the foreign key constraint.

    So which is the better way?
    See more | Go to post

  • sampalmer21
    started a topic C#.NET Threading problem.
    in .NET

    C#.NET Threading problem.

    Hi,

    I have a c# threading question:

    I have a main thread which calls a child thread process. While the child thread is running the main thread works on tasks. Is it possible for the main thread to know as soon as the child thread has completed and then allow the main thread to perform a cleanup task before returning back to its regular tasks? What I don't want to do is childThread.joi n() as this would cause the main...
    See more | Go to post
No activity results to display
Show More
Working...