|
I have a database on an AS/400 machine that I need to run some SQL statements against in my VB.NET application. I currently have Client Access V5R3, so I know that I have .NET compatibility.
Does anyone have an example of connecting to an AS/400 database, executing a SQL command and filling a dataset?
|
|
|
|
|
There is an article here on cp about that:
Accessing AS400 Business Logic From .NET Applications
By Kodanda Pani
http://www.codeproject.com/vb/net/Accessing_AS400.asp
|
|
|
|
|
Hi
I am new to programing could use some help
I have a form with a list box and 5 textbox's. i want to make the textbox's names into an array
i have tryed this code
Dim mycount as long
for mycount = 1 to listbox1.items.count
textbox(mycount).text = listbox1.items.item(mycount)
next mycount
thanks
|
|
|
|
|
Assuming the array is the listbox list, you were not clear about this:
The first thing that is wrong with your code is that you have textbox and listbox on the wrong side of the equation. Whatever is to the left of an = will take the value of what is to the right of the =. So with your code, the textbox.text would take the value of the listbox item.
Next, you probably want textbox.name rather than the text, unless the name is really shown in the textbox.
If you are adding the textbox names to the listbox, you need to use the add method of the listbox, listBox1.Items.Add().
|
|
|
|
|
Hi, Anon
sorry is was not clear
The arrray is the textbox,s and i want to fill the textbox's with the the values from the listbox on a click or button event
|
|
|
|
|
I am using PrintDocument Class in order to print a txt file, but I am getting the following exception
"RPC server is unavailable"
Can anybody help me.
Propose other methods to print the txt file, if you can.
Thanks in advance
|
|
|
|
|
Hi! I have an app that communicates over tcp/ip. About 50 people use the app and had no problems launching and executing it.But that was this one person in which the program didn´t launch, it just crashed and the error was:
"No Buffer Space Available -- A socket operation could not be performed because the system ran out of buffer space or the queue was full."
This happens i think when i create a new TcpClient and connect to the server.The strangest thing is that this part is inside a try-catch block to get the socketException Exceptions!!!
Any hints on this?The app runs fine on 50 other pc's but this one.Is it from my app or the pc ( I RATHER BLAME IT ON THE HARDWARE FOR A CHANGE )
Thx in advance.
Never say never
|
|
|
|
|
Hello,
Im currently working on a Database project using VB.NET 2003; the database contains a table "patients" with general fields like name , address , Date of birth , all are text and one field 'photo' which holds an image. How can i store and retrive the image to a picturebox in vb.net?
Is there a better method?
Thanks
Gopi Charan
|
|
|
|
|
Personally would not save them in the database, but just a reference to a file name/url. But if you must you need to use an OLE field and store the image as a Blob.
There are plenty of examples, have a look on google:
Storing Images Access Database[^]
Hope this helps
Tom
|
|
|
|
|
Hi,
Oracle Ver. 8.1.7
Client : ODP.Net ver 9.2.4
App. using VB.net
I have an application for our sales people, where our sales people prepare Client Visit Reports in MS Word (.Doc). At present they are entering the visit details into my application, now they want this report prepared in Word document also to be stored into the database and will be removed from their local drives. Anybody shld access the Report doc only thru this application.
I need to achieve the following :
1. User shld be able to upload a word file to the DB from a mapped drive.
2. Once loaded user shld be able to open the word file stored in the DB, thru the application and edit it and save it again.
I'm using Stored Procedures for all my DML.
Can we achieve this.
TIA
|
|
|
|
|
is there any method to build datagrid with check boxes.
|
|
|
|
|
Hello
It is there
There r two methods
first one is in ur Datasource table you sholud be craeat the Boolean Column
the u give the DataGrid DataSource
Datagrid.Datasource = Table (Table with Boolean column)
Otherwise create the table style Of DataGrid
Dim m_tbs as new DataGridTableStyle<br />
with m_tbs<br />
dim col as mew DataGridBoolColumn<br />
with col<br />
.MappingName= ColName
.witdh=180<br />
<br />
<br />
end with<br />
.GridColmnStyle.Add(col)<br />
end with<br />
<br />
DataGrid.TableStyles.Add(m_tbs)
I hope This will help to u
|
|
|
|
|
i have a database which contain 2 tables
"table1" and "table2"
i had defined primary and foreign keys
i had use adapter adap1 for "table1" and adap2 for "table2"
now i had generated a dataset "ds" using adap1 and adap2
adap1.fill(ds)
adap2.fill(ds)
now i want to have a relation in both tables
in wizard , we can do this by going into schema of dataset and creating relation
but can it be done through code
plz help
code will be more useful
|
|
|
|
|
|
Yes Sumit
you can do that
dim dr as DataRelation<br />
dr = new DataRelation("myRelation",ParaentCol,ChildCol)<br />
DataSet.Relations.Add(dr) But in this case u can do only with that dataSet tables itself
means if u have two tables in dataset u can make ralationship with the two tables
I hope this helps
Ishak
|
|
|
|
|
Hi, All
I Face a problem using data grid
how can I use datagrid Table Style and ColumnStyle Using SQL Statement Not only one table
I hope to get the answer programatically
|
|
|
|
|
Yaa U can do,
First u get the Shema Information Of the Table Through DataReder.GetShemaTable
So Now u can get the Schema information means column name and datatype etc
then in for loop u can give that information to dataGridTablestyles
Ishak
|
|
|
|
|
Hi To ALL,
can i access SQl server database in windows service application in VB.NET. If so pls give some hints
Thanks
Mahesh
|
|
|
|
|
Yes...
Use Google.
Seriously... DB access is DB access reghardless of what the client (application) is. Al a windows service is is an exe file run under a different context...
Probably ther biggest issue you might have is security access tothe DB. You might have to either impersonate a specific user in your DB access code or run the service under a speciai account that has access to the DB.
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Need help if possible with class project
need to write program in vb.net for school
the program should provide the height of a ball thrown straight up into the air. the program should request the initail height, hfeet, an dthe initail velocity, v feet per second, as input. The four options to be provided by buttons are as follows.
a)Determine the maximum height of the ball. Note:The ball will reach its maximum height after v/32 seconds.
b)Determine approx when the ball will hit the ground. Hint:Calculate the height after every .1 second and observe when the height is no longer a positive number.
c)Display a table showing the height of the ball every quarter second for five seconds or until it hits the ground.
d)Quit
The formula for the height of the ball after t seconds, h + v*t-16*t*t, should be specified in a user-defined function.
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
Why, oh why, are they teaching VB.net in schools ?
We're happy to help, but not to do your homework. First, you try. That's the point of the exercise. The world does not need this program, but you need to try and write it in order to solidify what you should have learned in class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No problem I'll post what I have so far. I am having a problem getting the fuction to work properly.
Thanks for the encouragement. I only need help not the solution.
Thanks again
|
|
|
|
|
This is what I ahve so far.
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim h As Double 'h is height
Dim v As Double 'v is velocity
Dim t As Double 't is time
Dim ballHt As Double
h = CDbl(txtIniHeight.Text)
v = CDbl(txtIniVelocity.Text)
t = 0
CalcBallHt(h, v, t, ballHt)
lstResults.Items.Clear()
lstResults.Items.Add(ballHt)
End Sub
Function CalcBallHt(ByRef h As Double, ByRef v As Double, _
ByRef t As Double, ByRef ballHt As Double) As Double
ballHt = h + v * t - 16 * t * t
Return ballHt
End Function
I am having a problem getting the function to work
I am sure it has something to do with the variable time but i'm not sure how to resolve this.
Please Help
Thanks
|
|
|
|
|
hello
Now WHat u want Exactly Your Programe work Properly as per ur requiste
for example
If u give h=2 and v= 2 then it will return 2
How BallHt= 2+2*0-16*0*0 remains 2*0-0 remains 2
it will execute in BODMAS order
I dont know waht result exactly u want,if u get wrong result change ur formula with brackets the first part u want to execute
Ishak
|
|
|
|
|
how to connect crystal reporet in vb
vikash ranjan
|
|
|
|