|
Hi,
By default the ToString returns then Namespace.ClassName of the object, you could change this behavior by overriding the ToString function (In case you design your own class), in your case try to use the following:
chargeDegree = cbxChargeDegree.Text
hope this helps
|
|
|
|
|
Thank You, but it still doesn't work. I think the problem is one of the following syntax:
cbxChargeName.DataSource = dsCharge.Tables(0).DefaultView<br />
cbxChargeName.DisplayMember = "ChargeName"<br />
cbxChargeName.ValueMember = cbxChargeDegree.SelectedText<br />
cbxChargeName.SelectedIndex = 0
The chargeName combobox does has the items I expected upon the selection on the chargeDegree comobox, but strangely the text string display is "System.Data.DataRowView".
Can anyone else help me, please?
Thank You Very Much. Ryan
|
|
|
|
|
I would like to start creating a Program that will get all the information about stocks. i will be using Visual Basic 2005. can some please help me with how do i get the data from the internet to the program. I want this to be a windows application. if anyone has any ideas please let me know how you would do this. Thanks
Danny
yellowlogic@cox.net
Danny
yellowlogic@cox.net
|
|
|
|
|
You need to find a source for stock info, obviously.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
XML is the best technology for data interchange, look for a provider that publish the data in XML format and the rest is easy.
Good Luck
|
|
|
|
|
Have a look at "Interacting With Web Sites in Code" by clicking here
|
|
|
|
|
ArrayList contains the row of data as its items. How to iterate through the lines, split each and store the data(array of columns) as new item in the ArrayList? Please provide example.
|
|
|
|
|
Hi,
I am not sure if you I got you right, please post your code to make your question clearer, for now you could iterate using the Count and Item properties:
'Abstraction
Dim c() As Columns
For I as Integer = 0 to coll.Count -1 'coll = ArrayList
c = coll.Item(i)
'Process your columns here
For J as integer = 0 to c.Length -1
... c(J)
Next
Next
hope this helps
|
|
|
|
|
In c#, the syntax is sth like this
(arry_List[3] as string[])[2]
arry_List[3] - the fourth item in the ArrayList, meaning third line.
the [2] means the third item in the columns array.
|
|
|
|
|
Anything written "In c#" is not really a good idea to have in the VB forum.
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
HI,
I have an application Ensemblepro, which shows realtime stats of the business in our organisation. It uses remote DB to store. and i didnt know the structure of the DB. (Limited Access). I need to get the real time data ?????? From that application in any format???
Can anyone post ur suggestions...
Thanx in Advance.....
Bala
|
|
|
|
|
You've asked this a few times, I really don't think you'll have much luck.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is there any tool to decomile dll into its native code.
Or else any tool to find what traffic was going between the sybase server and the application in my local PC.
Awaited for ur reply
Bala
|
|
|
|
|
Bala J wrote: Is there any tool to decomile dll into its native code.
That depends on what it was originally written in. If it's a native code, not managed code (.NET Framework), DLL, there are tools that will TRY to reverse the code back into something like C or C++. Anything else and you're pretty much SOL. A Managed code .DLL, you can use Lutz Roeder's .NET Reflector.
In either case, you will NOT get the orignal code out of the compiled product. You'll get something that resembles it, but it will not be perfect. You will also not get any comments, original variable names, documentation, ...
Basically, you have a huge handicap. If you don't know the structure of the database, you're just guessing at what you need to do. If you don't have the documentation on those .DLL's, again, you're just guessing at how they work.
|
|
|
|
|
HI Frndz, (Plz help)
can I use vb6 dlls in .net platform. Its a vb6 dll.
1. Also the application was created using ms-access as frontend. Is there anything like dlls avail for that sort of application.
2. The logic of that app. Its used in call center business. whenever a call strikes the switch the data gets populated into the appliocation as calls in queue.
3. is there any material where i can learn about windows dll programming
Regards,
Bala
|
|
|
|
|
Bala J wrote: can I use vb6 dlls in .net platform. Its a vb6 dll.
Yes. VB6 only compiled to COM .DLL's, so you would add a reference to the .DLL to import the classes exposed by it. You'll have to fingure out how to use the library in that DLL on your own since you don't have any documentation on it.
Decompiling the .DLL back to the original VB6 source will not give you the ORIGINAL VB6 source, but an approximation of it. There will be some stuff missing and some stuff that just plain won't work when you hit the Compile button on what it generates.
Bala J wrote: 1. Also the application was created using ms-access as frontend. Is there anything like dlls avail for that sort of application.
You don't need any .DLL's, at least not in the way you're implying. Access is a desktop database that any application can use.
Bala J wrote: 3. is there any material where i can learn about windows dll programming
Not really. It's no different than coding any other library in .NET. You write classes that expose methods and properties.
|
|
|
|
|
Hello everyone,
I am running VB.Net 2005 looking at an Access 2003 database.
I have a task that I am trying to get my head around and I need some help with. I have to read through a table and get the highest number from a certain field. I am kind of doing this already but I am doing a Count, I count the number of records returned from a filter/SQL statement and then using that amount, I add 1 to it and that is my Encounter number. But now I need change this process because it wasn't working out so great. Can someone look at this code and explain how I can change it to accomplish my task? Or point me to an article that will show me how to do this?
What you will see is that I am filtering out based on values in 2 fields, then counting the records returned. Instead I need run this filter/sql statement, but then look at a 3rd field in the table called PatSurgEnNo. and of the records returned with the filter/sql statement of the first 2 fields (MR number and VisitDate), I need to find the highest number in the PatSurgEnNo fields, so I can add 1 to it and that will become my new/current Encounter number.
Thanks in advance for any help that you can give!
Code I have now:
Dim PatSurgDate As String
MR = Me.txtMRNo.Text
PatSurgDate = Me.cbobxVisitDate.Text.ToString()
'Set Encounter to 0, count how many encounters for this date there are
' then add one to the encounter before creating a new entry
PatSurgEncounter = 0
Dim Count As Integer = 0
Using Connection As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DBPath)
Dim cmd As OleDbCommand = New OleDbCommand _
("Select Count(PatSurgAutoNo) as existingrecords from [Pat19PatSurg] where [PatSurgMRNo]=? and [PatSurgDate]=?", _
Connection)
cmd.Parameters.AddWithValue("@PatSurgMRNo", MR)
cmd.Parameters.AddWithValue("@PatSurgDate", PatSurgDate)
Connection.Open()
Count = cmd.ExecuteScalar
End Using
If Count >= 0 Then
'set new SurgEncounterNumber
PatSurgEncounter = Count + 1
Return
End If
|
|
|
|
|
You'd do better to use SQL for both of these, use COUNT and MAX ( from memory ) instead of doing it in memory and reading all the values.
select count(*) from Pat19PatSurg where [PatSurgMRNo]=? and [PatSurgDate]=?
select max(PatSurgEnNo) from Pat19PatSurg where [PatSurgMRNo]=? and [PatSurgDate]=?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
To get the largest value in a field, you use Max ...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
SELECT MAX(PatSurgEnNo) as "MaxNo" FROM TableName; ... but you still need to worry about the multi-user changes.
hope this helps
|
|
|
|
|
I am working on a import program that will import and update paradox file info in a SQL db. When I run my program I get this error: Cannot open database requested in login 'RAM'. Login fails.
Here is the code for the function:
Public Function ProductExist(ByVal PartNumber As String, ByVal SourceCode As String) As DataTable<br />
Dim con As New OleDbConnection<br />
Dim cmd As New OleDbCommand<br />
Dim dt As New DataTable<br />
Dim da As New OleDbDataAdapter<br />
<br />
'Tell the connection object where the database is.<br />
con.ConnectionString = "Provider=SQLOLEDB;Data Source=****,1433;Initial Catalog=RAM;User ID=****;Password=****;"<br />
<br />
'The command object needs to know which database it's connected to.<br />
cmd.Connection = con<br />
<br />
'The SQL command you want to perform<br />
cmd.CommandText = "SELECT ItemPartNumber, ItemSourceCode FROM Item_JS WHERE ItemPartNumber = '" & Trim(PartNumber) & "' AND " & "ItemSourceCode = '" & Trim(SourceCode) & "'"<br />
<br />
'Tell the DataAdapter which command object we're using.<br />
da.SelectCommand = cmd<br />
<br />
'Finally we instruct the DataAdapter to fill the DataTable<br />
da.Fill(dt)<br />
<br />
Return dt<br />
End Function
The error occurs on the line da.Fill(dt).
Any Ideas?
jds1207
|
|
|
|
|
I'm not a database guy, although it looks like DT is a null reference when you use it.
However, if "da.Fill(dt)" puts da into dt, then my theory falls apart, and could then be that da is not the same type as dt.
Perhaps you could check if the connection/command is being loaded correctly by adding breakpoints to each line (remembering that breakpoints come before the line is executed).
edit: Apologies. Just looked at it in a bit more depth. Ignore the null reference part. It seems I'm reading the lines wrongly, when I should read it like DirectX's CurrentParameters.
Need Another Seven Acronyms... Confused? You will be...
|
|
|
|
|
Can you access the database by other means? I don't know much about Paradox, but it sounds like the code cannot find it or the login credentials could be wrong...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The error is thrown simply because nowhere in your code do you actually connect to the database.
jds1207 wrote: cmd.Connection = con
You tell the DataAdapter to use this connection, but not to actually open it.
If you want you can try to adapt this function to your needs:
Public Function OpenConnection(ByVal conn As SqlConnection, Optional ByVal db As String = "") As Boolean<br />
Try<br />
If conn.State = ConnectionState.Closed Then conn.Open()<br />
If conn.State = ConnectionState.Broken Then<br />
conn.Close()<br />
conn.Open()<br />
If db <> "" Then conn.ChangeDatabase(db)<br />
End If<br />
If conn.State <> ConnectionState.Open Then OpenConnection = False Else OpenConnection = True<br />
Catch Ex As Exception<br />
MsgBox(Ex.Message & "happened in: public function OpenConnection")<br />
End Try<br />
End Function
just call it before .Fill .
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I am assigned a task in my first job that is to take data stored on Sql Server and to Programmitically using VB.NET upload the files into a SharePoint Document library. Does anyone have any suggestions on how to begin this project? Anything will help. Thanks
|
|
|
|