|
Dave Kreskowiak wrote:
ADO.NET is the way to go to get your app talking to an SQL Server ...
Not only SQL Server, ADO.NET can work with many more data sources such as Microsoft Access and Oracle to name a few.
Thank you,
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
markitoz wrote:
my question is if ADO.NET is necesary?
Yes, ADO.NET is the part of the .NET Framework that deals with databases. Just as ASP.NET is the part that deals with Web Applications.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event
|
|
|
|
|
Does ADO .NET work with a site built in php and MySQL. ?
|
|
|
|
|
Hello,
I am not very familiar with the VB products available. In our office we have VB6 so I decided to build an application, only to find out that I couldn't link into an access 2000 database, only '97. Is my next step to get VB.net or can I upgrade my VB6 (I already have service pack 6)?
Thanks in advance for any help.
Dave
|
|
|
|
|
use the last service pack (SP6) for Visual basic 6 if you want to use access 2000 with dat acontrol.
I use SP5 and works fine with access 2000 format
if you use ADO to connect to databases download the last MDAC from microsoft (version 2.8 as i recall)
|
|
|
|
|
hi
i want to convert my english format keyboard to urdu format when i type in my programm in console or Gui. plz give me the code that convert english format to urdu in visual basic.net.
thanx
best regards.
tenzeel.
tenzeel
|
|
|
|
|
I take it the symbols on the keyboard and it's layout are much different than an English keyboard. First, your going to have to replace the keyboard. Second, go into the Region and Language Options control panel and select the language you want. It's MUCH MUCH easier than writing a keyboard translator.
RageInTheMachine9532
|
|
|
|
|
I am receiving the following error when I try to open an existing VB .NET solution in the .NET IDE
Object reference not set to an instance of an object
The solution was copied from its existing location on the network, to my home network drive. I am able to see the form's code, but I can not pull up the form design view. I can run the project, change code, etc but I can not access the form.
When I click on the error, I jump to the first line of code for the form class. When I ask someone else to copy the master to their network drive or a removable drive, they do not receive the problem. This has happended in two separate instances this week.
|
|
|
|
|
My first question would be are you running the same version of the .NET Framework at home as your are at work? Are you running 1.0 at home and 1.1 at work?
RageInTheMachine9532
|
|
|
|
|
I am new to vb.net and crystal reports, so i don't know where to go to ask this question so if anyone could tell me a better forum to go or help me out I would greatly appreciate it. I am trying to create a report with two sections and totals for each the way i set it up is like this:
page header
'this part has the column names
Details
'this part is where the info form the database is shown(multipleEntries)
report footer
'this part is where the totals are shown
Now i want to put a section just like this one under it. so I add more sections to the footer but when it gets the info from the database i only get one entry back and there are many.
Thank you,
Santana
|
|
|
|
|
If you use the XP theme in your VB6 app, I have noticed:
(1) OptionButton background (i.e. where the caption is) is totally black!
(2) If CommandButton's are contained within a Frame they have a black thin border!
Does anyone know of anyway to stop this unwanted 'features'?
|
|
|
|
|
I have an array made up of a cutom structure called sl1. How can I find the index of the sl1 object, in the array, that has a name property equal to value I'm searching for?
|
|
|
|
|
You have to loop around the array until you find it.
For example:
Dim I As Integer
For I = 0 To ar.Count - 1
If CType(ar.Item(I), sl1).name = search Then
Exit For
End If
Next
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event
|
|
|
|
|
I am going to be developing an app where the user can write SQL code and would love to color code the commands as they write in a text box. Just like the database tools such as dbArtisan, Sql query analyzer,etc... Could anyone tell me how they do that or direct me somewhere. I have been unable to find anything nor figure out my own method.
Thanks
mtone
|
|
|
|
|
If you want to save yourself a lot of time have a look at this product (there are others out there too):
http://www.compona.com/Default.ascx[^]
Rugby League: The Greatest Game Of All.
|
|
|
|
|
I am not in the position to buy nor would I get the ok to buy third party tools.
Thanks.
|
|
|
|
|
I understand, although at $150 it would cost a lot less than to code it yourself.
Rugby League: The Greatest Game Of All.
|
|
|
|
|
Howdy mtone,
I am working on a control that will be a VS.Net equavelent that will cover syntax coloring. It will be free and I'll post it on CodeProject when I'm finished, but I'm not to close to finishing right now (school isn't helping a lot either).
There are several ways you could do it with the existing RichTextbox.
If you aren't worrying about speed, I would recommend Matt's article[^]. He covers the issue, but it's really, really, really slow.
If speed is an important factor, you might want to go with the SelectionStart(), SelectionLength(), and SelectionColor() properties.
This is some code that I made back in January before I started working on my own non-inherited RichEdit control. It colors JavaScript syntax, but can easily be modified to your needs. Note: I did not use RegEx because I wanted to keep it as "light as possible"
<br />
<br />
Public JSWords() As KeyWords<br />
<br />
Structure KeyWords<br />
Dim Word As String<br />
Dim Color As Color<br />
End Structure<br />
<br />
ReDim JSWords(8)<br />
JSWords(0).Word = "if"<br />
JSWords(0).Color = Color.Blue<br />
JSWords(1).Word = "then"<br />
JSWords(1).Color = Color.Blue<br />
JSWords(2).Word = "else"<br />
JSWords(2).Color = Color.Blue<br />
JSWords(3).Word = "for"<br />
JSWords(3).Color = Color.Blue<br />
JSWords(4).Word = "while"<br />
JSWords(4).Color = Color.Blue<br />
JSWords(5).Word = "not"<br />
JSWords(5).Color = Color.Blue<br />
JSWords(6).Word = "function"<br />
JSWords(6).Color = Color.Blue<br />
JSWords(7).Word = "return"<br />
JSWords(7).Color = Color.Blue<br />
JSWords(8).Word = "var"<br />
JSWords(8).Color = Color.Blue<br />
<br />
Public Sub JSColorVisibleLines(ByVal rtb As RichTextbox)<br />
Dim FirstLine As Integer = FirstVisibleLine()<br />
Dim LastLine As Integer = LastVisibleLine()<br />
Dim FirstVisibleChar As Integer<br />
Dim i As Integer = FristLine<br />
<br />
If (FirstLine = 0) And (LastLine = 1) Then<br />
Exit Sub<br />
Else<br />
While i < LastLine<br />
<br />
FirstVisibleChar = rtb.CharFromLineIndex(FirstLine)<br />
<br />
JSColorLineNumber(rtb, FirstLine, FirstVisibleChar)<br />
<br />
FirstLine += 1<br />
i += 1<br />
End While<br />
End If<br />
End Sub<br />
<br />
Public Sub JSColorLineNumber(ByVal rtb As RichTexbox, ByVal LineIndex As Integer, ByVal lStart As Integer)<br />
Dim Line As String = rtb.Lines(LineIndex)<br />
Dim i As Integer = 0<br />
Dim Instance As Integer<br />
<br />
LockUpdate()<br />
<br />
rtb.SelectionStart = lStart<br />
rtb.SelectionLength = Line.Length<br />
rtb.SelectionColor = Color.Black<br />
<br />
Instance = InStr(Line, "//")<br />
If Instance <> 0 Then<br />
rtb.SelectionStart = (lStart + Instance - 1)<br />
rtb.SelectionLength = (Line.Length - Instance + 1)<br />
rtb.SelectionColor = Color.Green<br />
End If<br />
<br />
If Instance = 1 Then<br />
UnLockUpdate()<br />
Exit Sub<br />
End If<br />
<br />
While i < JSWords.Length<br />
<br />
Instance = InStr(Line, JSWords(i).Word)<br />
<br />
If Instance <> 0 Then<br />
rtb.SelectionStart = (lStart + Instance - 1)<br />
rtb.SelectionLength = JSWords(i).Word.Length<br />
rtb.SelectionColor = JSWords(i).Color<br />
End If<br />
<br />
i += 1<br />
End While<br />
<br />
rtb.UnLockUpdate()<br />
End Sub<br />
<br />
Public Function FirstVisibleLine() As Integer<br />
<br />
Return SendMessage(rtb.Handle.ToInt32, EditMessages.GetFirstVisibleLine, 0, 0)<br />
End Function<br />
<br />
Public Function LastVisibleLine() As Integer<br />
<br />
Dim LastLine As Integer = FirstVisibleLine() + (Me.Height / Me.Font.Height)<br />
<br />
If LastLine > Me.LineCount Or LastLine = 0 Then<br />
LastLine = Me.LineCount<br />
End If<br />
Return LastLine<br />
End Function<br />
<br />
Public Sub LockUpdate()<br />
LockWindowUpdate(Handle.ToInt32)<br />
End Sub<br />
<br />
Public Sub UnLockUpdate()<br />
LockWindowUpdate(0)<br />
End Sub<br />
Good Luck
Aaron Eldreth
TheCollective4.com
|
|
|
|
|
This might also help.
Friend Enum EditMessages
GetSel = 176
SetSel = 177
GetLineCount = 186
LineIndex = 187
LineFromChar = 201
GetFirstVisibleLine = 206
CharFromPos = 215
PosFromChar = 1062
SetCharFormat = 1092
SetBgColor = 1091
GetCharFormat = 1082
SetScrollPos = 1246
GetScrollPos = 1245
End Enum
Sorry I forgot it in the first post.
Good Luck
Aaron Eldreth
TheCollective4.com
|
|
|
|
|
I really appreciate the help.
Thanks a Fortune.
|
|
|
|
|
|
Great!
The files for download are not availible. Is the code in the article all there is.
|
|
|
|
|
I'm really sorry about that. Another person pointed that out to me, and I fixed the links.
Again, sorry. It's my first article.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
I have inherited the Winforms Textbox control and added a property called Format, which will format the Integers to either Integer or Double etc. This format works fine on the OnValidating event of the textbox. But I want to set the format as and when the user types the value into the Textbox.
For example, if my format is ###,###.00 and when the user starts typing something like 1234 (and still continuing), I should automatically set the format to 1,234.00. I can able to do this, but my real problem is I have to position the caret next to the last character (or integer in this case) typed!!
Please help me out, dear friends!
N.T.GOPALAKRISHNAN
|
|
|
|
|
Have you tried using the SelectionStart() property?
Try this code at the end of your validating sub:
txb.SelectionStart += 1
Good luck!
Aaron Eldreth
TheCollective4.com
|
|
|
|