|
Well if I had to guess, then I would probably say your WHERE Clause is filtering out all of the results, so your getting a recordset with no records.
Also I just wanted to point out that while you close your data connection you forgot to close the recordset before setting it to nothing.
mellvincent wrote: DataGrid1.Text = rs(0).Value
Doesn't this set the data grids header text to that value (I don’t really remember)? Have you tried setting the text to a col - row first.
Or Set DataGrid1.DataSource = rs should also get the same results.
Hope this helps...
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
Hi all,
I'd like to do a PDA programming in VB.NET. The Q is:
1. Is there any website where I can find details on PDA programming-from scratch (details of what software to be used, the installation, etc )?
TQ
-- modified at 10:30 Sunday 18th December, 2005
|
|
|
|
|
Visual Studio comes with tools to develop pocket PC applications. You can develop software for the PPC using the .NET Compact Framework, which is a cut down version of the full .NET Framework. Basically, certain things are removed (like ASP.NET since your PDA is most unlikely to be used as a web server) and some things are added - like support for an on-screen keyboard.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
hi i want to know to allocate the memory in vc6 globalalloc or malloc is used. how to allocate huge
memory to store the rgbvalues of bitmap in .net. what is name of that .net class. or how to do that
ddd
|
|
|
|
|
|
I have a number of forms (named as Employee1, Employee2 etc.), one for each of the employees, describing the details about them. Each of these forms is supposed to be opened based on a query. The idea is depicted in the following sample code:
Dim frm As New Form
Dim EmpID As Integer = 1 ' for example, only - actually coming from a query
frm.Name = "Employee" & CStr(EmpID)
frm.Text = "Employee ID: " & CStr(EmpID)
frm.ShowDialog()
The EmpID is actually coming from a query. The above piece of code opens a blank form, without taking into account the Name property of the form, which used to work fine in VB6 (as I remember).
An idea to solve this problem is appreciated.
|
|
|
|
|
You haven't said what the problem is. Of course, the code you posted will open a blank form. What do you want it to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry for lack of my expression. My problem is that the following expression
frm.Name = "Employee" & CStr(EmpID) 'EmpID comes from a query.
in my code results in opening a blank form instead of opening one of the existing ones.
The above expression is evaluated at run-time, which should open a different form based on the result of the query. It evaluates to a different form like Employee1, Emplyee99 etc. (just for example).
The reason for having a separate form for each employee is hard to explain but each of them is like a report of each individual. It is an assignment, which I have to accomplish.
Looking for further help, please.
|
|
|
|
|
It won't open an existing one. Your code starts by creating a new form, with no controls on it. Are you creating a form for every employee record?? Why?!?!?! There's no reason for it!
Take the data from the form and create a new instance of your employee form, modify the controls on it to display the data you want, then show that.
You can build a form name and try to show that, but it requires Reflection to do it. IMHO, a VERY overly convoluted solution to a simple problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi community,
I am new in programming withj VS2005.
So i am looking for help in prograaming with the dBase Datafiles (*.dbf)
Where i can find some links and code ?
Bye
Rainer
|
|
|
|
|
|
here is example
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/VB_Databases/Q_21649629.html
|
|
|
|
|
I experimenting with Writing database applications and trying to do different things with different controls. My current problem is I've been working on a feature to search a database containg my DVD collection. It is an Access 2003 Database with only one table. Here is my code thus far with the area where the program bombs in bold, any help would be greatly appreciated.Also the code that is supposed to check for a database is'nt working either, but I commented it out for now:
'Search<br />
<br />
'If they have no active dataset, refuse:<br />
<br />
'If ds.Tables.Count = 0 Then<br />
' MsgBox("Please use the file menu to open a dataset, or create <br />
'a new one first.")<br />
' Exit Sub<br />
'End If<br />
<br />
'search for the target in both columns, then display it<br />
<br />
Dim searchfor As String = InputBox("Enter you Search Term", "Search")<br />
<br />
searchfor = searchfor.ToLower<br />
lstResults.Items.Clear()<br />
<br />
Dim i, x, y, count As Integer<br />
<br />
dt = ds.Tables!DVDLIST ' set dt to point to this table<br />
<br />
TotalRows = dt.Rows.Count<br />
<br />
For i = 0 To TotalRows - 1<br />
x = ds.Tables(Name).Rows(i).Item(0).ToString.ToLower.IndexOf(searchfor) 'See if Title column matches<br />
<br />
y = ds.Tables(0).Rows(i).Item(1).ToString.ToLower.IndexOf(searchfor) 'see about desc column too<br />
<br />
If x <> -1 Or y <> -1 Then 'Match<br />
lstResults.Items.Add(ds.Tables(0).Rows(i).Item(0))<br />
'Add title field to a listbox<br />
count += 1<br />
<br />
End If<br />
<br />
Next i<br />
<br />
<br />
If count = 0 Then 'no matches found<br />
MsgBox("No match for " & searchfor & " was found...")<br />
Else<br />
lstResults.Visible = True<br />
End If
BINARY
|
|
|
|
|
I don't see a bold line.
Binary0110 wrote: searchfor = searchfor.ToLower
Is Access case sensitive ? SQL Server isn't.
Binary0110 wrote: ds.Tables!DVDLIST
What does this do ?
Binary0110 wrote: For i = 0 To TotalRows - 1
x = ds.Tables(Name).Rows(i).Item(0).ToString.ToLower.IndexOf(searchfor) 'See if Title column matches
y = ds.Tables(0).Rows(i).Item(1).ToString.ToLower.IndexOf(searchfor) 'see about desc column too
If x <> -1 Or y <> -1 Then 'Match
lstResults.Items.Add(ds.Tables(0).Rows(i).Item(0))
'Add title field to a listbox
count += 1
End If
Next i
This is definately not how to write a database. You may as well store your data in text files if you're not going to use SQL to search through your data.
"SELECT * from DVDList where title LIKE '%" + searchfor +"' OR desc LIKE '%" + searchfor + "'"
would generate you something that would have a good shot of giving you what you need. I suggest you google for "Access VB.NET Connection" and see what you come up with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I could barely work out what he was trying to do - got my 5 for the translation to SQL
/jason
|
|
|
|
|
Dear friends i`m going to develop a POKER game using VB.NET, but i don`t gave any idea about game programming using VB.NET, please suggest me some books for that , and also some helpful information and website links. It`s very urgent. Please help
dipankar
|
|
|
|
|
If you are only making a simple poker game, you really don't need to get all fancy and do tons of research. You have 52 cards in a deck. You can select at random a number 1-52, each number representing a different card (1-13 = ace-king hearts suit, 14-27 = ace-king spades suit, etc), and you store what cards you have out on a 2 dimensional array to show who has them. For four players (3,4), unless you are using more than 5 cards. Once you have that down, you are left with the graphics. You could use labels, picture boxes, but from your post, I assume you want to get really fancy.
http://www.microsoft.com/downloads/details.aspx?FamilyID=9216652f-51e0-402e-b7b5-feb68d00f298&displaylang=en[^]
DirectX. I use it, but never really read any books on it, but I know tyhere is one out. You can make a fancy table object and use a cube object to handle the cards, just use different textures on them for different cards.
http://www.wings3d.com/[^]
^ is a good modeling program, but DirectX mainly users the .x or .m format, so you will have to convert your objects. Sorry I can't be of much help, but good luck.
|
|
|
|
|
|
Hello!
I need some help in vb.net to solve transparency between layered objetcs. If you help me to figure out I really appreciate it. Here is the brief scenerio:
I have one form what uses magenta as a transparent color and then I have a image (Picturebox) a donut with alphachannel transparency. So the donut's middle is using alpaha transparency. I have a picture box with a JPG image and another a label. All these tree are inside a panel object. How can make all these three objects transparent to each other? like JPG will be on the back and then label will be above it shown as transparent and then donut will be on the top but when I look at donut, its alphachannel transparent section should show the objects its behind.
Thank you very much!
Bedri
email: bckurd@e-kolay.net
Bedri
email: bckurd@e-kolay.net
|
|
|
|
|
First step - if you want to draw something fancy, do it yourself, instead of using a picture box. i.e. handle OnPaint and draw the image yourself, setting it's transparency by using the ImageAttributes class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have used the following code to print my file in dos mode. While printing it also prints the name of the file and its page no.
***
Dim oProc As New Process
Try
oProc.StartInfo.FileName = sFileName
oProc.StartInfo.Verb = "Print"
oProc.StartInfo.CreateNoWindow = True
oProc.Start()
Catch e As Win32Exception
If e.NativeErrorCode = ERROR_FILE_NOT_FOUND Then
Console.WriteLine((e.Message + ". Check the path."))
Else
If e.NativeErrorCode = ERROR_ACCESS_DENIED Then
Console.WriteLine((e.Message + ". You do not have permission to print this file."))
End If
End If
End Try
****
But I don't want this line no. and file name. How do i remove it while print?
Regards
Rams
Be simple and Be sample.
|
|
|
|
|
You're not printing in DOS mode. You're actually launching Notepad to print a *.TXT file (or whatever other extension). There's no way to tell Notepad to change its Page Setup settings from outside the interface. You'll have to use a differnet method to print them, like supplying your own printing code perhaps.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 14:18 Saturday 17th December, 2005
|
|
|
|
|
hi,
i m converting a vb project into .NET.
in crystal report "shape query" have been used.
it runs smoothly in vb. but gives error in .NET.
data from child table is not accessible.
i tried with ADODB.recordset,oledb.recordset,dataset n data reader but is unable to come out of error.
is it possible to use shape query in .NET?
please try to solve my problem!
|
|
|
|
|
Hi all,
I am getting a Security Exception while trying to write to the event log. I am logged on as an Administrator, have set the trust level to high and identity impersonate = true in the web.config file, and have created a new key called test in application in the event log and set the read and full control to user that I’m logged on as (i.e. Administrator) .I have set the event source of the event log I have created to test. I’m getting the following exception.
Server Error in '/ASP.NetProjects/EventLog' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I'll be really glad if anybody could solve my problem as i have been beating my head over this.
Thank you,
Aanchal.
|
|
|
|
|
I need some code in VB.Net that will get all the mac address
of all the network cards on our network. I beleive a broadcast
command would be the best way to do this. Does anyone know
where I can find some code to do this?
|
|
|
|