|
I think your issue may have to do with your table name of Caller Records. I would change the fill and the call to Tables to just use CallerRecords without the space.
Ben
|
|
|
|
|
Ben,
If name of the table is caller records. What can I use so that space in caller records won't be an issue? I never use spaces when naming but I took this project on and that is how it was.
thanks,
programmer
|
|
|
|
|
In your call to the dataAdapter.Fill just pass the dataset you want to be returned. YOu have to leave the correct table name in the sql query. Then when you access the tables, if you know you are only getting one table back you just need to access Tables(0)
Anyway, I hope that helps.
Ben
|
|
|
|
|
if I do what you are suggesting, I am getting different errors.
thanks for your help.
programmer
|
|
|
|
|
I told you before, you don't need all this code.
You're unncessarily reading the database into a DataSet, selecting the records that you've already selected in the SQL SELECT statement, modifying the data and (trying to) write the data back. You don't have to do this.
Here a hint for the SQL statement you should be using:
UPDATE [Caller Records] SET FirstName=@FirstName, LastName=@LastName,
CallerPhone=@CallerPhone, HospitalNumber=@HospitalNumber,
Type=@Type WHERE RecordNo=@RecordNumber
All of the words preceded with an "@" symbol are named parameters that you fill in with the data from your textbox's. You don't have to retrieve anything from the database to do what you want to do.
You can find more information on parameterized queries here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have an application that needs to add listbox items (strings) to an access database, with each item going to a new row in the table.
Each one of these items has a unique id number (autonumber in access) and am getting stuck with it not writing properly to the DB.
Wats the easiest way of going about this? Thanks
|
|
|
|
|
in Access each table has only one autonumber field. Therefore, I assume that you are trying to place the strings in different tables (right?). If your aim is to write these strings in to one table, I suggest you to use a loop and retrieve the strings and then place those to table one by one.
|
|
|
|
|
Hi !
I need to implement udp protocol in C#/VB.net Win Forms that send some request to the broadcast address from specific port and then change to be client and receive multiple answers from the broadcast on the same specific port.
My questions are:
1.Is the first connection should use blocking (synchronous) functions ?
2.Should I close this first socket,and then open another one on the same port in order to get the broadcast answers ?
3.In which way should I get the broadcast answers:a.using asynchronous function and events like BeginSend/EndSend etc or b.using threads ?
4.How do I get multiple answers on the same port in this case ?
I will be glad to get answers/code snippets.
Tnx
AliJ
|
|
|
|
|
1) no
2) use 2. one to speak another to listen (2 different ports)
3) i have used both...the threads is easier (less events to worry about)
4) a thread per message will be created, so just process them as they come in.
|
|
|
|
|
first,tnx for your reply.
nlarson11 wrote: 2) use 2. one to speak another to listen (2 different ports)
I need to get and send the messages on the same ports 1460-->5001 and the get all the replies 1460<--5001.My problem is that this port is already used due to the sending when I try to get the replies.
|
|
|
|
|
What I mean is...
your client app should
receive on port 1460
speak on 5001
your server app should
speak on 1460
receive on 5001
|
|
|
|
|
Assume there is a file called .dat. In that has a lot of texts.Its size is more than 400 kb.
In VB, i read the .dat file and store it in a string variable.
is it possible to store all the texts in a string?
Plz Help....
Thanks & Regards
Kumaran
|
|
|
|
|
Kumaran 21st Century wrote: is it possible to store all the texts in a string?
Yes.
|
|
|
|
|
Hi,
i build up an application in vb.net and win Instr option i searched for a string and depending upon the string found i am making some action ie copying or moving that file ,
i have made the script but its findout the string from some files and from some files cannot what could be the reason.
I am using FileStream property to read the word document line by line , can any one help me in this.
Regards
|
|
|
|
|
It doesn't work because a Word documnet is a multiple stream, binary format that doesn't work very well with any of the FileStream classes.
You have to open the document in Word to search for some text in it. This goes WAY beyond a simple text file reader and an Instr function. Now your getting into Office Automation. You can start with the documentation here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
Thanks for reply , but actually its working but its not moving some of the word file when search in the directory.
that means it findout for some word file but for some its not i want to know actually is there any way you can just track the whole word and find out exact word.
Regards
|
|
|
|
|
You might want to open one of those .DOC files that doesn't work in Notepad and see if you can find the word your searching for.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all.
I need to get current itemIndex from DataRow.
can help?
|
|
|
|
|
david bagaturia wrote: I need to get row from datatype.
Sorry, I can't understand your request.
|
|
|
|
|
david bagaturia wrote: I need to get current itemIndex from DataRow.
From the DataTable you have a collection of Rows (DataRowCollection [^]) which has an IndexOf [^] method. Pass the relevant DataRow in to the IndexOf method to get the result you want.
|
|
|
|
|
It help me thanks, but I need some littel Example to see how it works.
Can you write or tell ware I get littel code to find how it work.
Tanks again for you reply.
|
|
|
|
|
david bagaturia wrote: I need some littel Example to see how it works.
Dim theIndex as Integer
theIndex = myDataTable.Rows.IndexOf(someRow)
|
|
|
|
|
GIven the text file path.
on find button click it should prompt to find what in the text file ,and then a replace option to replace this foundd item with specified replace string in the text file
thanks
|
|
|
|
|
|
i need to more data by using Crystal Reports.
so that i changed
portrait to landscape in my class.
(objReport.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.portrait
to
objReport.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.landscape)
now i am getting larger screen.
SUB: My doubt is how to increase width( direct view ) of reprot in report project.
|
|
|
|