
fguihen
Avatar/Signature-
Posts
251 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by fguihen
-
when a user wants to add a new patient to the database, i want to autogenerate a primary key to identify the patient. how do i autogenerate this in c#, so that i know it wont clash with any records already in the database?
-
i have a datagrid and want to populate it with data from text boxes. i have 3 text boxes, each representing a column in a table. when each has info entered into it, and the add button is clicked i want to add the data from the 3 text boxes to a new row in the data table, this data will then be saved to the database. how do i add the info from the text boxes to the datagrid?
-
ok, if i bind a list box for example to a table so that it displays products. when a user selects the product, and adds it to a their shopping list table, i dont want the product name added, which is displayed in the list box or combo box or whatever you want to use. instead i want the product_Id added to the shopping list table. how can i do this without hard coding the product id into the application. when a product name is selected, the product id is added to the table?
-
im having a problem and its a bit difficult to describe but heres my best try: i have a patient table with a patient_id column. there is a child table of this called work_details. work details stores the types or work a patient does such as lifting, standing, carrying... i have a work types table. this has a work_type_id and a work_type. eg "wt_1 , lifting". on my form, each work type is represented by a check box. if the box is checked, a record will be added to the work_details table. my problem is this. i dont know how to associate the work_type_id with each check box. what im doing at the minute, is to manually type in the work_type_id into the tag property of the checkBox, and then use the line: row1["work_type_id"] = c.Tag; im sure there is a better way to do this. all the data from my database is stored in a dataset, including the work_types and id's. can anyone tell me a better way to do this, as i will face this problem a number of times in my application
-
i have to create a printout in RTF using C#. I downloaded the specification for RTF(rich text format). im having trouble making sense of the spec. ive looked at spec's before but its tough to make sense of some of them. has any of you experts any tips for making sense of specifications?
-
when declaring the parameters for an insert command for a data adapter i use a line like this: adapter.InsertCommand.Parameters.Add("@Phone",SqlDbType.Decimal,9,"Phone"); this is if im using an sql server database. if im using an OleDb connection ,connecting to an access database what do i use instead of SqlDbType??
-
i remember that, but i cant think of any other way to solve my problem. i have to gather a lot of info on a patient, on topics such as exercise habbits, sleep habbits, medication, hospital visits and so on. this is the only process i have therefore i only have tables related to this process. so my datset has to be a copy of my database. unless theres a different methodology of thinking about this, which i have not yet grasped
-
ive done a few searches for good tutorials on creating crystal reports in .NET and preferably using c# . i have found a few on c-sharp corner and places like that but there are very few tutorials availiable. if anyone knows of any good ones could you please post them in this thread. thanks
-
hi all. just learning all about the ASP.NET datasets. im creating a dataset thats a replica of my database. it took a while, as my database has a fair few tables and relationships, but i have it done. now heres my question. i will be gathering info from a form and adding it to the database. from my reasoning i have deduced that i simply add this data to the correct datatable in the dataset and then use the the dataAdapter.Update() method for each table that i have altered in the dataset. this means i have to have an adapter for each table and write an insert command for each adapter which seems a bit overkill. is there a better way to do this? im afraid i cant simply set the data adapter insert command to a big transaction, as im only using access and it doesnt allow transactions. also, do i have to fill the tables with the data already in the database, or can i just add the new rows? i mean , if i only add the new rows, then update the changes, will the old data all be over written?
-
how to get those little lines that break up a form
fguihen replied to fguihen's topic in Windows Forms
no , its not a group box. i remember using one with VB 6. its just a line that you can drag onto the form so as to segment it. i dont want a list box as it adds a bit too much. i thought if the line was in visual studio 6, then it would be in the .NET versions also. thanks anyway -
i have a small single user app. it gathers data and stores it in an access database. it doesnt need to be sql server , just in case anyone gives out to me. i have to create a couple of basic printouts on the data collected. what is the best solution for this? have not yet used crystal reports, and wonder if its worth me learning to use crystal, as i have to have this app finished soon , and it only has to be a basic report. any suggestions?
-
hi. i cant find that little line that allows me to seperate up a form. its just a line, it does nothing, and its only for astethics. can anyont tell me how to get it?
-
i have just posted on the windows newsgroups. if i get any solutions or help il post it here tomorrow evening. thanks for the help
-
i was running IIS and sql server ages before i installed VS 2005. as for services, when i first loaded on XP pro, i configured what services i wanted to be automatic or manual or disabled, and i now have very few non essential services running. i have almost no apps loading on startup . i have done a windows repair on my installation, but that didnt fix the problem. thanks for the suggestions anyway
-
i have to design a form to take in a lot of data. rather than have a huge form with a scroll bar and tons of text boxes, i was thinking of two better options: 1) use a tab control and spread the information gathering controls out over a number of tabs 2) have a next button on the bottom of each form and have the controls spread over a number of forms. i think idea 2 is more user friendly, but if anyone has any better ideas it would be great. thanks all
-
ok, when i installed VS 2006 i expected my pc to be very slow when using it. my pc is a bit slower, but not too bad. the problem is on windows load up. before anyone logs on , before the logon screen, there is a screen that says " windows is starting up". since i installed VS 2006 my computer gets stuck on this screen for about 5 minutes each time i turn on the pc. it is really annoying. has anyone seen this and how is it treated?
-
can you explain this a bit more please. my understanding is that if i have an insert command on the dataset, and set it as a cascading event( dont know how to do this) it will updatae each table that needs to be updated? can you elabourate to help my understanding? thanks
-
ok. i have a database with a good many tables and relationships. i have this reflected in the dataset ive created, so its an exact replica of my database. i want to be able to add a new record. does this mean that the insert command of my data adapter will be a huge command, inserting data into each of the 10 or so tables that data is entered into? ive used datasets and inserted data into one table at a time, but never more than one table. how do i do this if i have many tables to insert data into at once?
-
im designing a form to allow me to enter an unlimited number of records into a table. the number of records will never be more than 10 or so but it would suit the design better if i could enter as many as i wanted. heres the details: i have a customer table. a customer can have 1 or many visits to a resort. i want to come up with a solution to allow me to create a form to input all a customers visits. i dont want to limit myself by using text boxes as then im limited to the number of visits i can enter by how many text boxes i have. i suppose i could use a datagrid but what i want to know is can i have a button on a form that adds a row to a datagrid as i need it? can anyone think of a better way to get around this problem?
-
i have a large amount of details to take in off a form. im splitting it over 4 or so forms. i have to use an access database for this as its for a person using their own laptop and they wont purchace SQL Server. because the data is gathered over 4 or so forms, i think it would be very handy to use a stored procedure or transaction and if they cancel on the 4th form then no data would be stored. can this be done with access, or can anyone think of a way to accomplish this. il be using c# & .NET v1.1 as my coding platform.
-
yea, thanks. that was one of the issues i had. i had also forgotten to add an insertCommand to my data adapter. works now. thanks for your help
-
just one more thing. how do i send and use data in the next page using the POST method ?
-
im sending data from a web form to a web service that saves the data to a database. here is a simplified version of the web form code that creates a new row with the inputted data and passes it to the web service method InsertData. DataSet dataset = new System.Data.DataSet(); DataTable table = new DataTable("Feedback"); table.Columns.Add("Name"); table.Columns.Add("Phone"); table.Columns.Add("comment"); DataRow row = table.NewRow(); row["Name"] = this.TextBox1.Text; row["Phone"] = this.TextBox2.Text; row["comment"] = this.TextBox3.Text; table.Rows.Add(row); localhost.Service1 service = new Feedback.localhost.Service1(); dataset.Tables.Add("Feedback"); here is a basic version of the web service code that is supposed to insert the data into a table: first i open the connection like this: connString = "server=fintanspc; uid=fintan; pwd=nokia3210;database=Test"; conn = new SqlConnection(connString); adapter = new SqlDataAdapter("select*from Feedback",connString); dataSet = new DataSet(); adapter.Fill(dataSet,"Feedback"); dataTable = this.dataSet.Tables[0]; then i try to append the data using this method : public int InsertData(DataSet data) { this.OpenConn(); DataRow row; row = dataTable.NewRow(); row["Name"] = data.Tables["Feedback"].Rows[0].; row["Phone"] = data.Tables["Phone"].Rows[0].ItemArray[1]; row["comment"] = data.Tables["comment"].Rows[0].ItemArray[2]; dataTable.Rows.Add(row); adapter.Update(dataSet,"Feedback"); dataSet.AcceptChanges(); } this does not work, and i have tried many variants of this but i cant get it done. can anyone show me what im doing wrong
-
i have two web forms pages. how do i append values to the querystring in the first page, and then extract them on the second page? i know its easy to pass values in web form pages using properties, but i want to do it using the query string appended to the URL. i want to know how to pass values in from one html page to another and then display the 2nd page. thanks for any help
-
if i have a database of users and passwords, do i use windows , or forms authentication or do i have to create a custom authentication method?