473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

WPF project connection to sqlserver

anindya004
Members I have a question how to connect to sql server tables of a database with this proect's data.
Can you suggest .

Members you can see that inside the bin\debug\ContactManager.state now in this ContactManager.state is the file where the data is getting stored when I am running the proj.

There is a _stateFile in the ContactRepository.cs where the values are getting stotred.This variable is later on used for all the operations.
My question is how to connect to sql server instead to this ContactManager.state file

now inside contactrepository.cs file

<code>
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Runtime.Serialization.Formatters.Binary;
  6.  
  7. namespace ContactManager.Model
  8. {
  9.     public class ContactRepository
  10.     {
  11.         private List<Contact> _contactStore;
  12.         private readonly string _stateFile;
  13.  
  14.         public ContactRepository()
  15.         {
  16.             _stateFile = Path.Combine(
  17.                 AppDomain.CurrentDomain.BaseDirectory,
  18.                 "ContactManager.state"
  19.                 );
  20.  
  21.             Deserialize();
  22.         }
  23.  
  24.         public void Save(Contact contact)
  25.         {
  26.             if (contact.Id == Guid.Empty)
  27.                 contact.Id = Guid.NewGuid();
  28.  
  29.             if (!_contactStore.Contains(contact))
  30.                 _contactStore.Add(contact);
  31.  
  32.             Serialize();
  33.         }
  34.  
  35.         public void Delete(Contact contact)
  36.         {
  37.             _contactStore.Remove(contact);
  38.             Serialize();
  39.         }
  40.  
  41.         public List<Contact> FindByLookup(string lookupName)
  42.         {
  43.             IEnumerable<Contact> found =
  44.                 from c in _contactStore
  45.                 where c.LookupName.StartsWith(
  46.                     lookupName,
  47.                     StringComparison.OrdinalIgnoreCase
  48.                     )
  49.                 select c;
  50.  
  51.             return found.ToList();
  52.         }
  53.  
  54.         public List<Contact> FindAll()
  55.         {
  56.             return new List<Contact>(_contactStore);
  57.         }
  58.  
  59.         private void Serialize()
  60.         {
  61.             using (FileStream stream =
  62.                 File.Open(_stateFile, FileMode.OpenOrCreate))
  63.             {
  64.                 BinaryFormatter formatter = new BinaryFormatter();
  65.                 formatter.Serialize(stream, _contactStore);
  66.             }
  67.         }
  68.  
  69.         private void Deserialize()
  70.         {
  71.             if (File.Exists(_stateFile))
  72.             {
  73.                 using (FileStream stream =
  74.                     File.Open(_stateFile, FileMode.Open))
  75.                 {
  76.                     BinaryFormatter formatter = new BinaryFormatter();
  77.  
  78.                     _contactStore =
  79.                         (List<Contact>)formatter.Deserialize(stream);
  80.                 }
  81.             }
  82.             else _contactStore = new List<Contact>();
  83.         }
  84.     }
  85. }
.
</code>

now in this file you can see that

Expand|Select|Wrap|Line Numbers
  1. _stateFile = Path.Combine(
  2.                 AppDomain.CurrentDomain.BaseDirectory,
  3.                 "ContactManager.state"
  4.  
is there .
Now to connect it to the sqlserver what I have to do is instead of the binary file "ContactManager.state " ....I want a it to be connected to a *.mdf .

How to do this please suggest me .
This is an open source project.
for the detail explanation please see the two attached files with this question which have attached with this question.

The code can be downloaded from the website:
1. Go to www.informit.com/title/9780672329715.
2. Click Downloads.
3. Click one of links that appear, and the download should start automatically.
Attached Files
File Type: zip ContactManager.zip (21.7 KB, 415 views)
Mar 21 '10 #1
17 9251
tlhintoq
3,525 Expert 2GB
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

The tag is [code] not <code>
Mar 21 '10 #2
tlhintoq
3,525 Expert 2GB
My question is how to connect to sql server instead to this ContactManager.state file
now inside contactrepository.cs file
Until someone with more experience can offer more targeted advice I can point you toward these:

Database How-to parts 1 and 2
Database tutorial Part 1
Database tutorial Part 2
Mar 21 '10 #3
I know the sql data connection to the windows forms.
Like the following
<code>
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=STUDENT-1D40FC5\\SQLEXPRESS; Initial Catalog=LibraryMgnt;Integrated Security=SSPI");
string query = "insert into BookDetails(Title,Author,Publisher,Subject,No_Of_C opies)values('" + title.Text + "','" + author.Text + "','" + textBox3.Text + "','" + subject.Text + "','" + no.Text + "')";
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
SqlDataReader reader = cmd.ExecuteReader();
MessageBox.Show("The Book Details are saved.");
while (reader.Read())
{
}
reader.Close();

}
</code>

I want to know how to insert to the _stateFile in the code.
As if you see the full project and download it then you will see that it is using a binary file for the purpose of database connection and insert,update,delete.

So in place
<code>
_stateFile = Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
"ContactManager.state"
</code>
how to connect to the sql database or .mdf file rather than a binary file.
Mar 22 '10 #4
Experts I have a question---how to connect the following project to sql server and user insert/edit/update queries to the database-

1.Please open the page http://www.informit.com/store/produc...sbn=0672329859
2.click on Downloads
3.Please download the Contact Manager

4.Unzip ContactManager.zip
5.Please open ContactRepository.cs file
6.There you will find the following code

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Runtime.Serialization.Formatters.Binary;
  6.  
  7. namespace ContactManager.Model
  8. {
  9.     public class ContactRepository
  10.     {
  11.         private List<Contact> _contactStore;
  12.         private readonly string _stateFile;
  13.  
  14.         public ContactRepository()
  15.         {
  16.             _stateFile = Path.Combine(
  17.                 AppDomain.CurrentDomain.BaseDirectory,
  18.                 "ContactManager.state"
  19.                 );
  20.  
  21.             Deserialize();
  22.         }
  23.  
  24.         public void Save(Contact contact)
  25.         {
  26.             if (contact.Id == Guid.Empty)
  27.                 contact.Id = Guid.NewGuid();
  28.  
  29.             if (!_contactStore.Contains(contact))
  30.                 _contactStore.Add(contact);
  31.  
  32.             Serialize();
  33.         }
  34.  
  35.         public void Delete(Contact contact)
  36.         {
  37.             _contactStore.Remove(contact);
  38.             Serialize();
  39.         }
  40.  
  41.         public List<Contact> FindByLookup(string lookupName)
  42.         {
  43.             IEnumerable<Contact> found =
  44.                 from c in _contactStore
  45.                 where c.LookupName.StartsWith(
  46.                     lookupName,
  47.                     StringComparison.OrdinalIgnoreCase
  48.                     )
  49.                 select c;
  50.  
  51.             return found.ToList();
  52.         }
  53.  
  54.         public List<Contact> FindAll()
  55.         {
  56.             return new List<Contact>(_contactStore);
  57.         }
  58.  
  59.         private void Serialize()
  60.         {
  61.             using (FileStream stream =
  62.                 File.Open(_stateFile, FileMode.OpenOrCreate))
  63.             {
  64.                 BinaryFormatter formatter = new BinaryFormatter();
  65.                 formatter.Serialize(stream, _contactStore);
  66.             }
  67.         }
  68.  
  69.         private void Deserialize()
  70.         {
  71.             if (File.Exists(_stateFile))
  72.             {
  73.                 using (FileStream stream =
  74.                     File.Open(_stateFile, FileMode.Open))
  75.                 {
  76.                     BinaryFormatter formatter = new BinaryFormatter();
  77.  
  78.                     _contactStore =
  79.                         (List<Contact>)formatter.Deserialize(stream);
  80.                 }
  81.             }
  82.             else _contactStore = new List<Contact>();
  83.         }
  84.     }
  85. }
  86.  
  87.  
7.Now here you are seeing the following
<code>
Expand|Select|Wrap|Line Numbers
  1. _stateFile = Path.Combine(
  2.                 AppDomain.CurrentDomain.BaseDirectory,
  3.                 "ContactManager.state"
</code>

8.What this project is doing is it is storing the data in a binary data file ContactManager.state
9.Then passing those values to the variable _stateFile
10. Now my question is how to connect this project to the sql server and in place of the binary data file I want a table to be user in sqlserver .
11.How that is to be done I do not know.
12.I know the basic data connection to the winform application and insert/update/delete operation
as followes

<code>

Expand|Select|Wrap|Line Numbers
  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             SqlConnection con = new SqlConnection("Data Source=STUDENT-1D40FC5\\SQLEXPRESS; Initial Catalog=LibraryMgnt;Integrated Security=SSPI");
  4.             string query = "insert into BookDetails(Title,Author,Publisher,Subject,No_Of_Copies)values('" + title.Text + "','" + author.Text + "','" + textBox3.Text + "','" + subject.Text + "','" + no.Text + "')";
  5.             SqlCommand cmd = new SqlCommand(query, con);
  6.             con.Open();
  7.             SqlDataReader reader = cmd.ExecuteReader();
  8.             MessageBox.Show("The Book Details are saved.");
  9.             while (reader.Read())
  10.             {
  11.             }
  12.             reader.Close();
  13.  
  14.         }
</code>

13.But in this project how that connection is to be established I do not know and also how insert/update/delete queries are to be used .

14.Experts I thought that ContactRepository.cs file only is responsible for the data connection if I am wrong then please see the whole project where the required changes are to be made.That is the main reason I have send the url of the code project .

I am totally new to WPF please explain step by step
Mar 22 '10 #5
tlhintoq
3,525 Expert 2GB
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

I know I have said this in a few of your posts now.
The tag for code is [code] not <code>
Stop making other people do this for you. It's lazy.
Mar 22 '10 #6
tlhintoq
3,525 Expert 2GB
I have to say, you are asking an aweful lot of people just to answer
How to connect the following project to sql server and user insert/edit/update queries to the database
There really isn't a need to download your entire project etc. to tell you how to connect to a database and use insert/edit/update queries.

Database How-to parts 1 and 2
Database tutorial Part 1
Database tutorial Part 2
Mar 22 '10 #7
tlhintoq
3,525 Expert 2GB
Please don't double-post your questions. It divides attempts to help you in an organized and cohesive manner. Your threads have been merged
Mar 22 '10 #8
can you please suggest me how to replace the binary data file and what to do there as here binary data file is used
Mar 22 '10 #9
tlhintoq
3,525 Expert 2GB
What do you mean by "replace"?
Update the value in the database?
Or replace the use of a binary file with some other kind of data: Something different than binary file?

If you mean 'update the database'... That is very well covered in the tutorials. Did you *do* the tutorials?
Mar 22 '10 #10
tlhintoq ,
You have got it .In the project they have used the binary data file .
I want to use the sql server and a table to store all the data .
tlhintoq the queries of all the insert/update/delete are to be operated on that table.
I know the queries.
Database connection also i know .
But the problem is if you see in Address.cs there are
private string _city;
private string _country;
private string _line1;
private string _line2;
private string _state;
private string _zip;
these properties.
Also in Contact.cs there are these following properties
private Address _address = new Address();
private string _cellPhone;
private string _firstName;
private string _homePhone;
private Guid _id = Guid.Empty;
private string _imagePath;
private string _jobTitle;
private string _lastName;
private string _officePhone;
private string _organization;
private string _primaryEmail;
private string _secondaryEmail;

Now I have to pass them to the table sql server.
In the file ContactRepository.cs
there is
private List<Contact> _contactStore;
private readonly string _stateFile;

So that means that in the list _contactStore the all properties of contact are passed

And in the following code
public ContactRepository()
{
_stateFile = Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
"ContactManager.state"
);

Deserialize();
}

The binary file is getting the values.
Now what I have to do ...Please tell me.
Please do not get angry if I am asking some silly questions(It is because I am fresher)

Please help
Mar 22 '10 #11
tlhintoq
3,525 Expert 2GB
I will ask you again... Did you bother to walk through the two tutorials?
Just do the tutorials from start to finish. Don't try to apply them to your problem right now. First learn on a small scale how to interact with a database. Learn how to update small projects, small tables. Learn how to do the queries.

*THEN* take that new understanding and try to apply it to your larger project.

First you asked for help on how to do an update. Then you responded that you know how to update/query/connect/etc.
I know the queries.
Database connection also i know.
Then you say the problem is that you have properties. Why are properties such as a name or address a problem? Isn't that the sort of data you are wanting update?

Without asking others to download your entire project and do all your work for you... what exactly is the problem? Do you need help updating a database? Do you need help serializing a class?
Mar 22 '10 #12
Hello Experts,

i m also a part in this project ...

Here is the proper question .... i hope you guys can help us in this issue ...

The actual WPF project code that we have using this concept :

Taking data from a binary file and utilizing it in project .

What we want to do is ... instead of this binary file we want to take data from MSSQL database .


Here i m able to do mssql connection and i get my database values in to this application .

The Problem was , the data has to be formatted in a list type of way , so that we can utilize ...

See the following code ...
Expand|Select|Wrap|Line Numbers
  1.     private void Deserialize()
  2.         {
  3.             if (File.Exists(_stateFile))
  4.             {
  5.                 using (FileStream stream =
  6.                     File.Open(_stateFile, FileMode.Open))
  7.                 {
  8.                     BinaryFormatter formatter = new BinaryFormatter();
  9.  
  10.                     _contactStore =
  11.                         (List<Contact>)formatter.Deserialize(stream);
  12.                 }
  13.             }
  14.             else _contactStore = new List<Contact>();
  15.         }
  16.  
this is the function which takes binary data from file and passing it to application ...

this is the following line doing that specific operation on above function ...
Expand|Select|Wrap|Line Numbers
  1. _contactStore =
  2.                         (List<Contact>)formatter.Deserialize(stream);
  3.  

so i have to alter this piece of code to replace my mssql data instead of this binary data .

i get my mssql data in some string type variables . now i have to store those values to _contactStore object , so that application can use that . Here comes the problem . this _contact Store object requires list type of input . so i assembled my mssql values into list type and i tried to pass there ... but it is not accepting that .....

this is the actual problem what we are having .... can any one help us on this ...
Mar 23 '10 #13
tlhintoq
3,525 Expert 2GB
this _contact Store object requires list type of input .
Does it? _contactstore is a List<> of Contact objects.
Expand|Select|Wrap|Line Numbers
  1. private List<Contact> _contactStore;
There is nothing here that tells us what data is *in* a Contact. Maybe it also contains one or more List<> variables. Maybe it doesn't. If you say a Contact object requires a List<> type as its input then we have to beleive you, but its seems unlikely. I would expect a Contact object to have a lot of properties such as
  • _FirstName
  • _LastName
  • _StreetAddress
  • _City
and so on.

Regardless what it contains you need to make a new Contact object and .Add it to the List<>

http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx
Mar 23 '10 #14
Sir I think you have not yet seen the project.I am sure if you see it once you can give the exact solution. ---It is my earnest request to you if you download the project from http://www.informit.com/store/produc...sbn=0672329859
I know you are too busy , but it will be your kind benevolence if you once glance upon it . It won't take more than 2 sec to download sir.

Sir the Contact.cs is as follows
Expand|Select|Wrap|Line Numbers
  1. using System;
  2.  
  3. namespace ContactManager.Model
  4. {
  5.     [Serializable]
  6.     public class Contact : Notifier
  7.     {
  8.         private Address _address = new Address();
  9.         private string _cellPhone;
  10.         private string _firstName;
  11.         private string _homePhone;
  12.         private Guid _id = Guid.Empty;
  13.         private string _imagePath;
  14.         private string _jobTitle;
  15.         private string _lastName;
  16.         private string _officePhone;
  17.         private string _organization;
  18.         private string _primaryEmail;
  19.         private string _secondaryEmail;
  20.  
  21.         public Guid Id
  22.         {
  23.             get { return _id; }
  24.             set
  25.             {
  26.                 _id = value;
  27.                 OnPropertyChanged("Id");
  28.             }
  29.         }
  30.  
  31.         public string ImagePath
  32.         {
  33.             get { return _imagePath; }
  34.             set
  35.             {
  36.                 _imagePath = value;
  37.                 OnPropertyChanged("ImagePath");
  38.             }
  39.         }
  40.  
  41.         public string FirstName
  42.         {
  43.             get { return _firstName; }
  44.             set
  45.             {
  46.                 _firstName = value;
  47.                 OnPropertyChanged("FirstName");
  48.                 OnPropertyChanged("LookupName");
  49.             }
  50.         }
  51.  
  52.         public string LastName
  53.         {
  54.             get { return _lastName; }
  55.             set
  56.             {
  57.                 _lastName = value;
  58.                 OnPropertyChanged("LastName");
  59.                 OnPropertyChanged("LookupName");
  60.             }
  61.         }
  62.  
  63.         public string Organization
  64.         {
  65.             get { return _organization; }
  66.             set
  67.             {
  68.                 _organization = value;
  69.                 OnPropertyChanged("Organization");
  70.             }
  71.         }
  72.  
  73.         public string JobTitle
  74.         {
  75.             get { return _jobTitle; }
  76.             set
  77.             {
  78.                 _jobTitle = value;
  79.                 OnPropertyChanged("JobTitle");
  80.             }
  81.         }
  82.  
  83.         public string OfficePhone
  84.         {
  85.             get { return _officePhone; }
  86.             set
  87.             {
  88.                 _officePhone = value;
  89.                 OnPropertyChanged("OfficePhone");
  90.             }
  91.         }
  92.  
  93.         public string CellPhone
  94.         {
  95.             get { return _cellPhone; }
  96.             set
  97.             {
  98.                 _cellPhone = value;
  99.                 OnPropertyChanged("CellPhone");
  100.             }
  101.         }
  102.  
  103.         public string HomePhone
  104.         {
  105.             get { return _homePhone; }
  106.             set
  107.             {
  108.                 _homePhone = value;
  109.                 OnPropertyChanged("HomePhone");
  110.             }
  111.         }
  112.  
  113.         public string PrimaryEmail
  114.         {
  115.             get { return _primaryEmail; }
  116.             set
  117.             {
  118.                 _primaryEmail = value;
  119.                 OnPropertyChanged("PrimaryEmail");
  120.             }
  121.         }
  122.  
  123.         public string SecondaryEmail
  124.         {
  125.             get { return _secondaryEmail; }
  126.             set
  127.             {
  128.                 _secondaryEmail = value;
  129.                 OnPropertyChanged("SecondaryEmail");
  130.             }
  131.         }
  132.  
  133.         public Address Address
  134.         {
  135.             get { return _address; }
  136.             set
  137.             {
  138.                 _address = value;
  139.                 OnPropertyChanged("Address");
  140.             }
  141.         }
  142.  
  143.         public string LookupName
  144.         {
  145.             get { return string.Format("{0}, {1}", _lastName, _firstName); }
  146.         }
  147.  
  148.         public override string ToString()
  149.         {
  150.             return LookupName;
  151.         }
  152.  
  153.         public override bool Equals(object obj)
  154.         {
  155.             Contact other = obj as Contact;
  156.             return other != null && other.Id == Id;
  157.         }
  158.     }
  159. }
  160.  
And the Address.cs is as followes--
Expand|Select|Wrap|Line Numbers
  1. using System;
  2.  
  3. namespace ContactManager.Model
  4. {
  5.     [Serializable]
  6.     public class Address : Notifier
  7.     {
  8.         private string _city;
  9.         private string _country;
  10.         private string _line1;
  11.         private string _line2;
  12.         private string _state;
  13.         private string _zip;
  14.  
  15.         public string City
  16.         {
  17.             get { return _city; }
  18.             set
  19.             {
  20.                 _city = value;
  21.                 OnPropertyChanged("City");
  22.             }
  23.         }
  24.  
  25.         public string Country
  26.         {
  27.             get { return _country; }
  28.             set
  29.             {
  30.                 _country = value;
  31.                 OnPropertyChanged("Country");
  32.             }
  33.         }
  34.  
  35.         public string Line1
  36.         {
  37.             get { return _line1; }
  38.             set
  39.             {
  40.                 _line1 = value;
  41.                 OnPropertyChanged("Line1");
  42.             }
  43.         }
  44.  
  45.         public string Line2
  46.         {
  47.             get { return _line2; }
  48.             set
  49.             {
  50.                 _line2 = value;
  51.                 OnPropertyChanged("Line2");
  52.             }
  53.         }
  54.  
  55.         public string State
  56.         {
  57.             get { return _state; }
  58.             set
  59.             {
  60.                 _state = value;
  61.                 OnPropertyChanged("State");
  62.             }
  63.         }
  64.  
  65.         public string Zip
  66.         {
  67.             get { return _zip; }
  68.             set
  69.             {
  70.                 _zip = value;
  71.                 OnPropertyChanged("Zip");
  72.             }
  73.         }
  74.     }
  75. }
  76.  
Mar 23 '10 #15
tlhintoq
3,525 Expert 2GB
Sir I think you have not yet seen the project.I am sure if you see it once you can give the exact solution. ---It is my earnest request to you if you
You're right. I haven't downloaded your project, nor am I going to. Someone else with more free time might. But frankly, I don't make it a habit to download unknown code and run it on my PC. Nor do I make it a habit to completely debug other people's projects.

You provided the code for your Contact class. As I thought, it does not have a List<> in it, but a bunch of properties as one would suspect. Which means your original statement that it requires a List<> as input is wrong.
this _contact Store object requires list type of input .
i get my mssql data in some string type variables . now i have to store those values to _contactStore object
Stop right there. _contactstore is not an object. It is a list of objects. It is a List<> of Contact objects. A List<> is a fancy array if that helps. So _contactstore is an array of Contact objects.

If you are getting your mssql data as a bunch of strings that's great. Make a new Contact with them since your Contact object is also a bunch of string properties.
Expand|Select|Wrap|Line Numbers
  1. public class Contact : Notifier
  2.     {
  3.         private Address _address = new Address();
  4.         private string _cellPhone;
  5.         private string _firstName;
  6.         private string _homePhone;
  7.         private Guid _id = Guid.Empty;
  8.         private string _imagePath;
  9.         private string _jobTitle;
  10.         private string _lastName;
  11.         private string _officePhone;
  12.         private string _organization;
  13.         private string _primaryEmail;
  14.         private string _secondaryEmail;
Mar 23 '10 #16
Sir
I have failed to send the data to the
_contactStore

in the
_contactStore =
(List<Contact>)formatter.Deserialize(stream);

Can you please tell me in which format the data has to be send so that _contactStore will accept the data and subsequently that can be stored in table in sql

I am sorry to say I have never worked on the "storing list of objects which can be passed to the table in database in sql server"
Just give me an example or refer a url so that I can come to know that .
It will be your kind benevolence if you suggest.
Mar 24 '10 #17
tlhintoq
3,525 Expert 2GB
From your own code:
_contactStore is a List of Contact objects.
Expand|Select|Wrap|Line Numbers
  1. _contactStore = new List<Contact>();
And a Contact has a bunch of public properties that make sense for a Contact:
Expand|Select|Wrap|Line Numbers
  1. public string ImagePath
  2.         {
  3.             get { return _imagePath; }
  4.             set
  5.             {
  6.                 _imagePath = value;
  7.                 OnPropertyChanged("ImagePath");
  8.             }
  9.         }
  10.  
  11.         public string FirstName
  12.         {
  13.             get { return _firstName; }
  14.             set
  15.             {
  16.                 _firstName = value;
  17.                 OnPropertyChanged("FirstName");
  18.                 OnPropertyChanged("LookupName");
  19.             }
  20.         }
  21.  
  22. // and so on with all the other properties of a Contact
Can you please tell me in which format the data has to be send so that _contactStore will accept the data
You have to send your data to the Contact object the way it is defined. EX: For the FirstName send it a string as defined in line 11 of the code above.

Just give me an example or refer a url so that I can come to know that .
This isn't the complicated part. This is a basic property.
http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx

Please don't be offended when I say "If you're having this much trouble in such basic areas then this project may be beyond what you/your company can do."
Maybe it's time to tell your boss that you don't have the training to complete this project. It might be the nudge (s)he needs to get you some more training which can only further your career.

Either that or your company needs to quit underbidding qualified coders on projects that they don't have the expertise to handle - because it is unfair to their staff (you) to expect results they aren't prepared to produce. Nobody needs that kind of pressure placed upon them. It just makes people miserable.
Mar 24 '10 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Refky Wahib | last post by:
Hi I need Technical Support I finished a Great project using .Net and SQL Server and .Net Mobile Control My Business case is to implement this Program to accept about 1 Million concurrent...
3
by: ebrahimbandookwala | last post by:
Hi , I am trying to connect to MS Sql server 2000 from Java (1.4.2 / 1.5 ). I installed my Sql Server(8.00.382) from the one supplied with VS.NET 2001. When I installed it on my laptop it did not...
1
by: Lauren Quantrell | last post by:
I'm wondering which is the best approach using an Access2K front end and a SQL Server 2K backend. I have a stored procedure running three INSERT INTO statements that inserts records into three...
1
by: Jim Devenish | last post by:
I am continuing my exploration about upsizing to SQLServer from Access 2000. I have a split database with a front-end and a back-end, each of which is A2K. I have spent some time in bookshops...
5
by: Dave Dudley | last post by:
Hi, I have a new ASP .Net project that has been developed on our development machine and connects to SQL Server 2000 on the same machine. It is connecting via a connection string similiar to:...
1
by: Galina Grechka | last post by:
Hi Recently I started get error message every time when trying to open web project from Microsoft Visual Studio.Net: Unable to open Web project. The path does not correspond to URL. The two...
3
by: Dan Sikorsky | last post by:
Can I use SQLServer 2000 with ASP.NET 2.0 instead of SQLServer 2005, and use the .Net 2.0 Membership functionality? I've setup my Login page, controls, etc., and now it's time to use the Web...
2
by: CriticalJ | last post by:
I have several projects that have been working for at least four years. Last Thursday, the connections for these projects began dropping immediately upon opening the project. When I test the...
21
by: adjo | last post by:
I am working on an app with an Access2002 frontend and Sql2005 backend. I have to use integrated security. I want to prevent my users from altering data in another way than via the frontend. It...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.