16,012,821 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by alom_93 (Top 69 by date)
alom_93
3-May-12 7:06am
View
hi,
Its is an array of records.. It just stores students names and marks in to the array. However i then want to take each name and mark and store it in ms access database.
alom_93
2-May-12 15:41pm
View
can you explain what i do here:
DataRows[] drResults = dsData.Tables[0].Select("ColName = 'criteria');
foreach(DataRow dr in drResults)
{
object[] row = dr.ItemArray;
dt.Rows.Add(row);
alom_93
11-Apr-12 20:37pm
View
ok thanks, got it working.... Put it on the basis of what u provided and changed it around and now working..
alom_93
10-Apr-12 21:10pm
View
In the table app there are 3 rows 2010,2011, 2012... Now your saying if the rows.count=0 then do something BUT it doesnt = 0 as it has 2010,2011,2012 (3 rows) and not 0..
The code im using to get data is displayed now added to the orginal post
alom_93
9-Apr-12 19:16pm
View
the code u suggested is in logically right because it counts how many rows there are and there are 3... but in the code ur saying if it = 0 then do something but it does not = 0 it =3..
I need something to check if that row exists.
What do u mean what SQL am i using, im using MS access?
thanks
alom_93
9-Apr-12 19:12pm
View
can u help?
alom_93
8-Apr-12 18:30pm
View
Deleted
n
alom_93
7-Apr-12 19:32pm
View
thanks for your input, but if what do i put in the 'do something' part? if it collects the rows -1 what should happen next? Display error?
alom_93
6-Apr-12 19:54pm
View
Nope doesnt work just continues as normal and that is expected because there is already 3 rows in the table.. And your saying if =0 then write message but there is 3 rows already..
Could you show me how i can use the SQL count function or which ever one will help me to achieve what im after.
Thanks
alom_93
5-Apr-12 19:22pm
View
here is the code i was using:
Try
sql = ("SELECT * FROM Application")
Dim dsx As New DataSet("app")
Dim dax As New OleDb.OleDbDataAdapter
dax = New OleDb.OleDbDataAdapter(sql, con)
dax.Fill(dsx, "app")
Dim tblapplications As DataTable
tblapplication = dsx.Tables("app")
If dsx.Tables("app").Rows(year).Item(0) = nothing Then
msgbox("Year does not exist!")
else
call add()
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
i have tried to use what u have said with the dbnull but i get blue squiggly lines.. Also if i set the SQL like this "SELECT year FROM App WHERE year=cb.text"
i also get an error saying no values given for parameters
alom_93
5-Apr-12 18:33pm
View
i would have posted the code but it wasnt working and i deleted it... But i set up the data adapter and dataset and then put if function to see if the row exists or not. Ill try to put the code back up.
Thanks for the link
alom_93
5-Apr-12 13:26pm
View
i have tried to execute the code to see if the row exists by using IF function and making = nothing so if the row doesnt exist the error message occurs.. But the problem i seem to face is that for e.g system accepts 2012 and accepts the application, the next user puts 2013 it skips the if function and then later throws a run time error.
Also you said try this SQL: "SELECT year FROM table WHERE year=2013" but the year could be 2014 or 2015 how do i edit this.
Could you explain the last one using the count? didnt fully understand that one
alom_93
28-Mar-12 19:01pm
View
thanks but which one will help me?
alom_93
2-Mar-12 18:39pm
View
please can you help?
alom_93
2-Mar-12 18:39pm
View
yeah i have a primary key set to member id so its ok however will i still that new table which has id and late fee??
yeah i am just a beginner
alom_93
1-Mar-12 18:28pm
View
oh ok i understand what your saying.... however it does seem rather long and complicated. isnt there another way of doing this?
alom_93
1-Mar-12 7:20am
View
thanks for your input, can you explain a little more what this does. I understood that i gets the memberID but what happens after that? i mean how do it add for e.g £2.40 to the late fee part of the record.
Thanks
alom_93
29-Feb-12 18:28pm
View
didn't really understand what your saying can you kindly explain...
because the members table consists of member id,name address,tel no and late fees and if some one has a late fee then that value should be added to the late fees section of the record or at least update the current value.
Thanks
alom_93
28-Feb-12 18:02pm
View
thanks got a slight problem where it says
da.fill(ds,"contacts") i get error when i press the update button. It says "No value given for one or more required parameters."
alom_93
26-Feb-12 9:25am
View
i'm looking for someone to show me how to implement what im after. The psuedo code has given me an rough idea but i cant implement it.
Can you please show me how?
thanks
alom_93
24-Feb-12 17:49pm
View
thanks but still get blue line on "reservationConn"
alom_93
22-Feb-12 18:13pm
View
i get blue squiggly lines around "OleDBconnection" "OleDbdataadapter" and "viewresds"
whats the problem and what is viewresds.
thanks
alom_93
21-Feb-12 18:13pm
View
ok thnaks, will have a look at this!
alom_93
21-Feb-12 14:58pm
View
Private Sub search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles search.Click
dim con as new oledb.oledbconnection
dim da as new oledb.oledbdataadapter
dim fn as string
Dim c As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = " & fn
dim ds as new dataset
con.connectionstring=(c)
con.open
da.fill(ds,"s")
con.close
inc=-1
Dim ca As New OleDb.OleDbCommandBuilder(da)
ds.Tables("s").Rows(inc).Item(1) = TextBox2.Text
ds.Tables("s").Rows(inc).Item(2) = TextBox3.Text
ds.Tables("s").Rows(inc).Item(3) = TextBox4.Text
ds.Tables("s").Rows(inc).Item(4) = TextBox5.Text
ds.Tables("s").Rows(inc).Item(5) = TextBox6.Text
ds.Tables("s").Rows(inc).Item(6) = TextBox7.Text
ds.Tables("s").Rows(inc).Item(7) = TextBox8.Text
ds.Tables("s").Rows(inc).Item(8) = TextBox9.Text
da.Update(ds, "s")
MsgBox("updated")
alom_93
21-Feb-12 14:03pm
View
thanks for the link, however none of these will help me as i wish to connect and update through coding and not through the use of wizards etc.
alom_93
21-Feb-12 13:40pm
View
.mdb file
alom_93
21-Feb-12 11:48am
View
sorry to disturb you, but i am require some help from you.. Using the data i already have i now wish to update some records etc and when i press update i want the actual db to be updated aswell.. can you help me, i have been spending alot of time trying to figure it out but i cant get my head around it.
e.g from you sample db i wish to change some details of say product id 12414 and when i press update i want the actual MS access database to be updated.
Can you help me?
Thanks
alom_93
21-Feb-12 11:41am
View
Private Sub search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles search.Click
dim con as new oledb.oledbconnection
dim da as new oledb.oledbdataadapter
dim fn as string
Dim c As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = " & fn
dim ds as new dataset
con.connectionstring=(c)
con.open
da.fill(ds,"s")
con.close
inc=-1
Dim ca As New OleDb.OleDbCommandBuilder(da)
ds.Tables("s").Rows(inc).Item(1) = TextBox2.Text
ds.Tables("s").Rows(inc).Item(2) = TextBox3.Text
ds.Tables("s").Rows(inc).Item(3) = TextBox4.Text
ds.Tables("s").Rows(inc).Item(4) = TextBox5.Text
ds.Tables("s").Rows(inc).Item(5) = TextBox6.Text
ds.Tables("s").Rows(inc).Item(6) = TextBox7.Text
ds.Tables("s").Rows(inc).Item(7) = TextBox8.Text
ds.Tables("s").Rows(inc).Item(8) = TextBox9.Text
da.Update(ds, "s")
MsgBox("updated")
alom_93
20-Feb-12 19:08pm
View
THANK YOU !!!!! for everything really thanks you have taught me few things
alom_93
20-Feb-12 19:08pm
View
THANK YOU SO MUCH IT FINALLY WORKS!! THANKS FOR ALL YOUR HARD WORK!!!!
THANK YOU
alom_93
20-Feb-12 18:35pm
View
its not an autogenerated ID column the product ID is set as primary key and data type is text
alom_93
20-Feb-12 11:01am
View
text is being entered such as product names, quantity ordered, in stock, product id, date of order etc
alom_93
19-Feb-12 19:37pm
View
i understand what your saying but how do i edit it?
thanks
alom_93
19-Feb-12 19:20pm
View
but how can edit the code to say that? index =0?
alom_93
19-Feb-12 18:58pm
View
ok thanks
alom_93
19-Feb-12 18:26pm
View
many thanks for all your help so far but still cant solve it, for e.g in my db my forst record has product id a1 now if i enter that results appear. the second record is a2 now if i enter that the program says not found but still displays the data.
i have seen same happens on the one u created, but only on the first one, if i enter 12414 it says not found but displays data however the others are fine.
dont understand what the problem is
alom_93
19-Feb-12 18:06pm
View
on my form if i enter the details for every column and then press update i get this error message but it points at this code:
da.Update(ds, "s")
and says "syntax error in UPDATE statement"
and says
alom_93
19-Feb-12 11:46am
View
Thanks for your reply, however i'm a little confused.. Could you kindly explain clearly.
Thanks
alom_93
19-Feb-12 11:45am
View
dataadapter:
dim da as new oledb.oledbdataadapter
SELECT * FROM S
that is the staement used..
can u provide help?
alom_93
19-Feb-12 11:42am
View
thanks for all your help i will have a look..
in my code i got squiggly line for dsstock but then i realised i forgot to write check in front of it and the sql was set up as a variable.
anyway will have a look at your code.
alom_93
19-Feb-12 11:32am
View
Deleted
what do you mean?
alom_93
18-Feb-12 21:09pm
View
no change still the same
alom_93
18-Feb-12 20:42pm
View
ok thanks,
alom_93
18-Feb-12 20:31pm
View
i'm using Visual Basic 2008 express edition
alom_93
18-Feb-12 20:30pm
View
i did and when the program run this is what appears in the new textbox:
System.Windows.Forms.TextBox, Text:
alom_93
18-Feb-12 19:58pm
View
what do you mean? how will it function?
can you kindly explain.
Thanks for all help so far
alom_93
18-Feb-12 19:57pm
View
thanks,
now what is happening is that if i enter the first product id from the db it displays the data without any errors BUT those after the first one says not found and still displays the data..
what am i doing wrong?
alom_93
18-Feb-12 19:53pm
View
Deleted
this works BUT if i enter a incorect id no messgae comes up saying not found.
alom_93
18-Feb-12 19:41pm
View
how can i fix this? where is the problem
alom_93
18-Feb-12 19:39pm
View
i get an error if i try this
"ElseIf index = Nothing or -1 or < 0 Then"
it dont allow the <0
alom_93
18-Feb-12 19:35pm
View
how can i achieve this? im a little bit confused
alom_93
18-Feb-12 18:26pm
View
thanks for your reply, the actual error i get is the line of code Not Found!
but the product ID that do exist i get the same error message which is not meant to happen.
The aim is i enter the product ID and the press search and all data is displayed on the product ID so cant really cut down, also i know quantity is misspelled but thats how it is on the actual database its self.
Any other suggestions why i get the error?
alom_93
15-Feb-12 18:28pm
View
thanks for your reply, I have achieved the initial question and now moved on to the next part which is the updating. I am NOT asking you to write anything for me..
I hope the updating is easy.
ill try to code it if i cant ill post my code and try to get some help.
Thanks
alom_93
14-Feb-12 18:47pm
View
hi,
thanks i used your line and tweaked it abit to get the correct answer however i require a little bit of assistance. Now imagine that the total fee the program produced needs to be saved in a database under a members ID, can this be done? For e.g member id j32 is in the database under members, now he has incured a fee of £6.00 and this needs to be added to his record.. how can i achieve this?
So far i have established connection to the database and table and to the exact field i want to update, but how do i code it to update?
Thanks
Thanks
alom_93
12-Feb-12 18:19pm
View
Will try it tomorrow, if not i will post my code and you can help me correct my mistakes.
Once sorted will accept the soloution.
Many thanks for the help so far, much appreciated!!
alom_93
12-Feb-12 17:53pm
View
Thanks for your help.... i understand what your saying, however i was following a tutorial from a handout somebody gave to me and this is where it lead me. I am now understanding your work and it makes better and more sense to me than what i wrote. Anyway i have a question.. on the form i have another text box called additional cost, the value of additional cost should be added to latecharge to produce a total fee, that is where the total variable was meant to come in. However i am a little confused on how i can make this possible can u help me please? thanks btw its not a homework, its just some excercises im trying out to gain some knowledge
alom_93
12-Feb-12 17:53pm
View
Deleted
Thanks for your help.... i understand what your saying, however i was following a tutorial from a handout somebody gave to me and this is where it lead me. I am now understanding your work and it makes better and more sense to me than what i wrote. Anyway i have a question.. on the form i have another text box called additional cost, the value of additional cost should be added to latecharge to produce a total fee, that is where the total variable was meant to come in. However i am a little confused on how i can make this possible can u help me please?
thanks
btw its not a homework, its just some excercises im trying out to gain some knowledge
alom_93
8-Feb-12 17:44pm
View
fixed although u provided the baseline for my mistake so thanks
alom_93
8-Feb-12 17:44pm
View
thanks but now fixed
alom_93
8-Feb-12 17:44pm
View
examinerecords is a function it helps to display the data i want from the database.Whats currently happening is that when i enter a product ID for e.g 4 only the first record comes up i.e product id 1. I want what i searched for i.e product id 4 to appear.
Yes used SQL statement SELECT * FROM [STOCK MANAGEMENT]
Please can you help, running out of time
alom_93
7-Feb-12 17:40pm
View
gives an error saying syntax error
alom_93
7-Feb-12 17:40pm
View
nope not working
alom_93
6-Feb-12 11:03am
View
I'm not expecting line by line help. I know the basics but wish to progess into my task. Anyway what books/tutorials can you recommend to me?
alom_93
6-Feb-12 11:01am
View
Do you know any examples using VB?
alom_93
5-Feb-12 18:51pm
View
What do i require to run this?
alom_93
5-Feb-12 18:43pm
View
Oh ok, i would need to learn that and how to connect my task to the sever etc.
Can you estimate roughly how long it will take to complete this task?
alom_93
5-Feb-12 18:40pm
View
Can you send me some links please.
Thanks
alom_93
5-Feb-12 18:38pm
View
What do you mean by that?
alom_93
5-Feb-12 18:06pm
View
my plan was for the data to be stored in a MS access database and then work from there. I have a rough idea how it should work but i needed to be guided
Show More