ADO Find code problem?


Can someone show me the codes in finding records in databases I am new to VB6 and can't understand the format. plz help me........
Posted On: Monday 24th of December 2012 01:13:20 AM Total Views:  278
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




ado controll

please somebody tell me what is ado control in vb and its use
VIEWS ON THIS POST

102

Posted on:

Wednesday 24th October 2012
View Replies!

edit txt file

I would like to edit a text file what is the best way to do it I saw some stuff about textreader with this I can find the line that I want to modify , but after , how can I modify this line by using textwriter I guess
VIEWS ON THIS POST

98

Posted on:

Friday 2nd November 2012
View Replies!

SystemFileWatcher

, Can anyone tell me how to set up the filter property to look for more than one file type msdn says we can set the filter to '*.*' or *.txt' etc, but doesn't say how to specify more than one type. I've tried a pipe delimited string but it didn't seem to work e,g '*.txt|*.log|*.xml'
VIEWS ON THIS POST

75

Posted on:

Saturday 3rd November 2012
View Replies!

Object reference not set to an instance of an object...HELP!

I have an asp project that I developed using vb.net as the background. In my project I added a reference to a .dll file which can be seen in the properties page of my project. I then add code to access the object in a click event on the form. \t\t Dim b = New GreenSheetGlobalBL.GSBL \t\t Dim strReturn As String \t\t End If strReturn = b.ProcessUser("User", Me.cboPlants.SelectedValue, Session("sGSHID"), intUserID, Me.cboManager.SelectedItem.Value, 2) So basically the user fills out some information which is passed to the .dll and a string is passed back with the results. The issue is that I'm getting an inconsistent "Object reference not set to an instance of an object". What am I doing wrong
VIEWS ON THIS POST

128

Posted on:

Saturday 3rd November 2012
View Replies!

Outlook clients get garbled Mail when body format is HTML

I am sending out an HTML table to email recipients. the body format is set to Mailformat.HTML. The Outlook clients get spurious '!" marks and other data is in the wrong place thoughout the email message. The same message sent to Lotus Notes users looks fine. Has anyone else seen this type of problem Any suggestions on how to fix it Thank You
VIEWS ON THIS POST

151

Posted on:

Saturday 3rd November 2012
View Replies!

need help for changing c# to vb

there is a code in http://www.c-sharpcorner.com/Code/2002/July/EditableListBox.asp and I dont know how to change this code: listBox1= (ListBox)sender itemSelected = listBox1.SelectedIndex ; Rectangle r = listBox1.GetItemRectangle(itemSelected); string itemText = (string)listBox1.Items[itemSelected]; editBox.Location = new System.Drawing.Point(r.X + delta , r.Y + delta ) ; editBox.Size = new System.Drawing.Size(r.Width -10 , r.Height- delta); editBox.Show(); listBox1.Controls.AddRange(new System.Windows.Forms.Control[] {this.editBox}); editBox.Text = itemText ; editBox.Focus(); editBox.Select(); editBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.EditOver); editBox.LostFocus += new System.EventHandler(this.FocusOver); can anybody help
VIEWS ON THIS POST

187

Posted on:

Saturday 3rd November 2012
View Replies!

Formatting Text Field

, I have a text field with data format of (including spaces) " 4+25000g " how do I get a format of "25000", I know how to apply Trim() but how do I get rid of the other elementsof text to just get "25000"
VIEWS ON THIS POST

56

Posted on:

Saturday 3rd November 2012
View Replies!

date conversion

I know this is an old problem, and there are answers on the board, but can't find the answer that works for me. dim daydate as integer dim monthdate as integer dim yeardate as integer ' get the form elements daydate = request.Form("day") monthdate = request.Form("month") yeardate = request.Form("year") gig = request.Form("gig") 'format the variables dim strdate as string = (monthdate & "/" & daydate & "/" & yeardate) response.write(strdate) newdate = Convert.ToDateTime(strDate) response.write(newdate & "wibble") This kicks out an error that its not in a recognised format. Any pointers appreciated.
VIEWS ON THIS POST

76

Posted on:

Saturday 3rd November 2012
View Replies!

VB and C# got different results

all I want use PostedFile.FileName property to get a upload file name, it is ok in C#, but in VB, I got an exception: System.ArgumentNullException: Value cannot be null. Parameter name: dst at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count) at System.Web.HttpInputStream.Read(Byte[] buffer, Int32 offset, Int32 count) at ASP.Test1_aspx.UploadImage_Click(Object sender, EventArgs e) in C:\WebStore\test1.aspx:line 20 Thank you very much.
VIEWS ON THIS POST

214

Posted on:

Saturday 3rd November 2012
View Replies!

between 2 array

this doesn't work >>> -------------------------------------- Private Function DisplayItems(ByVal nums() As Integer) As StringCollection Dim _DI As New StringCollection Dim _strs() As String = New String() {"A,B,C,D,E,F,G"} For i As Integer = 0 To nums.Length - 1 _DI.Add(_strs(nums(i))) Next Return _DI End Function -------------------------------------- I try to get my values >>> -------------------------------------- dim _nums as integer = New Integer() {2, 3, 4} For Each s As String In DisplayItems(_nums) c.Controls.Add(New LiteralControl(s + " ")) Next -------------------------------------- I must Get >>> C D E
VIEWS ON THIS POST

105

Posted on:

Saturday 3rd November 2012
View Replies!

class names and namespace behaviour

This is something that I'm not sure if it's a problemor something I have configured wrong. Just thinking on it is making my head hurt!! So here goes. What I'm doing... 1. create a blank VS2010 web project called "MySite"targeted at 4.0 2. create a new class object, calling it "class1.vb" (cause it's so unique!!) 3. change default code to read as such... NamespaceMySite PublicClassFunctions PublicSharedFunctionWhatIsTodaysDate()AsString ReturnDate.Now.ToLongDateString EndFunction EndClass EndNamespace 4. create a newwebform and drop a label control on it. In the page_load event, I want to set the label to equal the value of Function WhatIsTodaysDate. Simple enough, but now comes the part that escapse me. I can do this...Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = MySite.Functions.WhatIsTodaysDate() End Sub but if I want to shorten my code, and call the function using an "Imports" tag i have todo this...Imports MySite.MySite.Functions Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = WhatIsTodaysDate() End Sub End Class Why is VS asking me to call the namespace twice if I use the "Imports" directive\t\t I'm sure this has got something to do with VS2010 and the 4.0 framework.
VIEWS ON THIS POST

118

Posted on:

Wednesday 7th November 2012
View Replies!

Using a Function Component

I have a function to determine the correct time that appears to function correctly, but I must be making some mistake in the "calling" of the function. This is the first time I have trieduse a component and it shows.
VIEWS ON THIS POST

86

Posted on:

Wednesday 7th November 2012
View Replies!

Some problems with looping through dataset

Hi all, I have a problem hope someone can help me out here. I'm trying to do mass e-mailing. The codes that I have now: \t\t\t For Each row In dataWS.getAssignedStaffInformat ion(campID).Tables(0).Rows \t\t\t\t\t Dim address As String = row("email").ToString \t\t\t\t\t Dim staffName as String = row("staffName").ToString \t\t\t\t\t mail.From = New MailAddress("no-reply@kk.com") \t\t\t\t\t mail.To.Add(address) \t\t\t\t\t mail.Subject = "Notification \t\t\t\t\t mail.Body = "" + staffName + "!" \t\t\t\t\t mail.IsBodyHtml = True \t\t\t\t\t Dim smtp As New SmtpClient("127.0.0.1") \t\t\t\t\t smtp.Send(mail) \t\t\t Next The problem now is that it literally sends the email. My database table: staffName / email Roy / roy@hotmail.com Steve / steve@hotmail.com Instead of sending only 1 email, to Roy, according to roy's email, the application also sends steve's email to roy. Which also means steve will also receive 2 emails, one meant for him and and one supposingly is for Roy, is also sent to him. For example, in Roy's inbox: Email 1: Roy! Email 2: Steve! In simple words, Roy will get his own email AND the email meant for steve as well. How do I make it such that Roy will only receive the email which is meant for him Is it a problem with my SQL statements or is it a problem with the loop
VIEWS ON THIS POST

250

Posted on:

Wednesday 7th November 2012
View Replies!

Sub Name as parameter

... can u tell me whether i can pass a Sub Name as a parameter If yes how
VIEWS ON THIS POST

69

Posted on:

Wednesday 7th November 2012
View Replies!

Cant acess elements from array object

I have an array object called arr() from arr_class. I get problem in calling each elements of it. Here is the classarr_class PublicClassarr_class Dim_val1()AsInteger Dim_val2()AsInteger PublicPropertyval1()AsInteger() Get Return_val1 EndGet Set(ByValvalueAsInteger()) _val1=value EndSet EndProperty PublicPropertyval2()AsInteger() Get Return_val2 EndGet Set(ByValvalueAsInteger()) _val2=value EndSet EndProperty EndClass I need to call each element in val1 and val2. I've tried using this code but it gives me error. For i = 0 To (arr.Count - 1) For j = 0 To (arr(i).val1.Count - 1) msgb0x(arr(i).val1(j)) Next Next Is there anyone can help me please Where do i make mistakes or what do i miss in those code Thankyou
VIEWS ON THIS POST

144

Posted on:

Wednesday 7th November 2012
View Replies!

Help needed urgently for coding in vb.net please...

Hi Using VB.NET, i have to develop a plugin which must analyse a web interface and point out what is wrong. For example, if textboxes in a home page are not well-aligned, the plugin must detect this and align the textboxes correctly. I guess some codes about how to edit the source code of web pages are needed and how to detect the positions of textboxes also. This is the simplest task which the plugin must do. Please help me.
VIEWS ON THIS POST

277

Posted on:

Wednesday 7th November 2012
View Replies!

help splitting string

This may give you the deed output. If you are looking for the output like(TestSite TestName Test Place) validValues = validValues.Replace(Chr(59), "") \t\t\t For Each value As String In validValues.Split(Chr(35)) \t\t\t\t\t If value.Split(Chr(126)).Length = 2 Then \t\t\t\t\t\t\t Console.WriteLine(value) \t\t\t\t\t\t\t If value.Split(Chr(126))(0) = "0" Then \t\t\t\t\t\t\t Else \t\t\t\t\t\t\t\t\t attribute &= value.Split(Chr(126))(1)& Chr(32) \t\t\t\t\t\t\t\t\t Console.WriteLine(attribute) \t\t\t\t\t\t\t End If \t\t\t\t\t End If \t\t\t Next \t\t\t Return attribute \t End Function
VIEWS ON THIS POST

170

Posted on:

Wednesday 7th November 2012
View Replies!

make property required, catch at compile time?

here is a class: Public Class Class1 Dim _iID As Integer = Nothing\t Public Sub New() If _iID = Nothing Then\t\t\t\t\t Throw New ArgumentNullException("Class1.SetID")\t\t\t End If\t End Sub\t Public WriteOnly Property SetID() As Integer\t\t\t Set(ByVal value As Integer) _iID = value\t\t\t End Set\t End Property\t Public Function SayGoodbye() As String\t\t\t Return "goodbye!"\t End Function End Class if, in code, i do this: Diml_cClass1 As New Class1\t\t\t l_cClass1.SayGoodbye() then i get an app error when running the app, because i didn't set the ID. I was wondering if there's a way to make sure the programmer assigns all properties in the class, and fail at COMPILE TIME rather than have to catch the error at runtime...
VIEWS ON THIS POST

153

Posted on:

Wednesday 7th November 2012
View Replies!

compilation error

I have a dev web which is having the following error.\t I have been working on the site for several months and haven't recieved errors like this. I opened the same page I was working on yesterday and boom, all these errors show up when I tried to display the page. Please help. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30269: 'Public Sub New()' has multiple definitions with identical signatures. Source Error: Line31: Line32:\t\t\t_ Line33:\t\tPublicSubNew() Line34:\t\t\t\tMyBase.New Line35:\t\t\t\tMe.BeginInit Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\r2e\c8870e36\3a788727\App_Code.hltgvxap.5.vb \t Line: 33
VIEWS ON THIS POST

182

Posted on:

Wednesday 7th November 2012
View Replies!

trying to add up my prices I have in a checkbox list

I have some prices listed in a checkboxlist that I am trying to add up. First I was going to add the mto a list box and add them up that way but I forgot how to do it. Its been awhile and I dont have my notes with me. Need help please. Or fi somenoe knows any easy way to add up checkbox list valuesplease suggest it. Also,the first loop is only addingthe first selected checkbox itemnot all of them. Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click ListBox1.Items.Clear() 'add prices to list box Dim i As Int32 For i = 0 To CheckBoxList1.Items.Count - 1 If CheckBoxList1.Items(i).Selected Then ' List the selected items ListBox1.Items.Add(CheckBoxList1.SelectedValue.ToString) End If Next 'total up prices For Each item In Collection ...item Next End Sub End Class
VIEWS ON THIS POST

255

Posted on:

Wednesday 7th November 2012
View Replies!

information about "Timer" control

Hi !!! I'm developing an Asp.net data access application and I want to program an independient module that access to a database periodically. I have heard about a VB.NET control calls "Timer" that could help me, but I am incredibly lost about it, and I dont know how to use it. Could I use it from ASP.NET or should I add a VB module to my asp.net Project How can I use this control Could anybody help me\t
VIEWS ON THIS POST

105

Posted on:

Wednesday 7th November 2012
View Replies!

How to put a big file into a variable?

, I'm not able to put a big file (600Mo) into VarDonnesDuFichier3 . With the MsgBox line, VarDonnesDuFichier3 displays zero (o). Where is my problem Is there an other way to open a big file (600Mo) into VarDonnesDuFichier3 (with the special data like a mpeg) Dim VarDonnesDuFichier3 as String NumFichier = FreeFile Open Text2.Text For Binary Access Read As #NumFichier VarDonnesDuFichier3 = Space$(LOF(NumFichier)) MsgBox VarDonnesDuFichier3 'VarDonnesDuFichier3 gave zero (0) with a 600 Mo file. Get #NumFichier, 1, VarDonnesDuFichier3 Close #NumFichier ======================================== a+ Raymond H. -- divers_rh@hotmail.com
VIEWS ON THIS POST

80

Posted on:

Wednesday 7th November 2012
View Replies!

How can I run my VB6 program from a server?

How do I install my VB6 program onto a file server such that can run that single copy Is there a problem with it not installing the packaged files on each individual PC
VIEWS ON THIS POST

168

Posted on:

Wednesday 7th November 2012
View Replies!

How to read & split a text file using System.IO.File?

Dear vb.net Pro [:)], I have a info.dat file which contain columns & datasuch as follow: \t Name\t\tAge\t\tContact M\t sam\t\t\t 18\t\t\t 66666888888 M\t vincent\t 17\t\t\t 55555555555 F\t shirley\t\t17\t\t\t33333333333 How can i read the file &splitthe data in between so i can do filtering & displayingas below Eg: 1) Name: sam, vincent, shirley or \t\t 2) Sex (M):same, vincent or \t\t 3) Age below 18 : vincent, shirley Any recommend site or coding provided Many-many
VIEWS ON THIS POST

182

Posted on:

Wednesday 7th November 2012
View Replies!

Help needed! Console app for moving/renaming files

I have a process where we receive a file with a static name to a specific folder each day. I need to write an executable that I can run through DTS that will: Grab the file and move it to a new archive location (lest it get overwritten), and Rename the file, affixing the current date. Im not good with console apps... The sytax is something like: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination but Im stuck there... I dont know how to tell the app how to append the date to the filename, and the sytax seems to be stuck in the system. Currently this is what I have: Public Sub OnLoad() File.MOVE [/Y][\\ServerName\FromEHI\NWRADBilling]ICcharges.txt \\ServerName\FromEHI\NWRADBilling\FileArchive End Sub VisualStudio doesn't like the code and I'm at a loss for how to create this. Can one of you code gurus point me to the right direction please
VIEWS ON THIS POST

172

Posted on:

Wednesday 7th November 2012
View Replies!

who wants to be a millionaire project

Hi I got a college assignment to do to make who wants to be a millionaire game Public Class Form1 Structure question Dim question As String Dim A As String Dim b As String Dim c As String Dim d As String Dim answer As String End Structure Dim questions(14) As question Dim currentquestion As Integer = 0 Dim Prizemoney(14) As Integer Private Sub setupprizemoney() Prizemoney(0) = "100" Prizemoney(1) = "200" Prizemoney(2) = "300" Prizemoney(3) = "500" Prizemoney(4) = "1000" Prizemoney(5) = "2000" Prizemoney(6) = "4000" Prizemoney(7) = "8000" Prizemoney(8) = "16000" Prizemoney(9) = "32000" Prizemoney(10) = "54000" Prizemoney(11) = "125000" Prizemoney(12) = "250000" Prizemoney(13) = "500000" Prizemoney(14) = "1000000" End Sub Private Sub setupquestions() questions(0).question = "how many moons do we have" questions(0).A = "2" questions(0).b = "1" questions(0).c = "984" questions(0).d = "We have a moon" questions(0).answer = "1" questions(1).question = "Who was the first president of america" questions(1).A = "Kevin" questions(1).b = "George washington" questions(1).c = "Tariq Salameh" questions(1).d = "Abraham lincoln" questions(1).answer = "George washington" questions(2).question = "Who sang the song in 1974 called 'no woman no cry'" questions(2).A = "Barrack obama" questions(2).b = "Tariq Salameh" questions(2).c = "Bob Marley" questions(2).d = "Justin bieber" questions(2).answer = "Bob Marley" questions(3).question = "Am i cool" questions(3).A = "Yes" questions(3).b = "No" questions(3).c = "Chewing gum" questions(3).d = "Abraham lincoln" questions(3).answer = "Yes" questions(4).question = "Who was the first Tv chef" questions(4).A = "Franny craddock" questions(4).b = "Tony blaire" questions(4).c = "Kevin" questions(4).d = "Abraham lincoln" questions(4).answer = "Franny craddock" questions(5).question = "How old is craig" questions(5).A = "7" questions(5).b = "30" questions(5).c = "Its over 9000!" questions(5).d = "99" questions(5).answer = "Its over 9000!" questions(6).question = "Who was the first president of america" questions(6).A = "Barrack obama" questions(6).b = "George washington" questions(6).c = "George Bush" questions(6).d = "Abraham lincoln" questions(6).answer = "George washington" questions(7).question = "Who created mankind" questions(7).A = "Not sure" questions(7).b = "Maybe kevin" questions(7).c = "could be phil" questions(7).d = "Nah im sure its kevin" questions(7).answer = "Nah im sure its kevin" questions(8).question = "Where does Tariq live" questions(8).A = "Gy" questions(8).b = "Meggies" questions(8).c = "kevin" questions(8).d = "Humberstone avenue" questions(8).answer = "Gy" questions(9).question = "Who was the first president of america" questions(9).A = "kevin" questions(9).b = "kevin" questions(9).c = "kevin" questions(9).d = "George washington" questions(9).answer = "George washington" questions(10).question = "Kevin" questions(10).A = "Sleep" questions(10).b = "Cool" questions(10).c = "Hard working" questions(10).d = "Legend" questions(10).answer = "Sleep" questions(11).question = "Tariq For" questions(11).A = "Kevin" questions(11).b = "Amy
VIEWS ON THIS POST

109

Posted on:

Saturday 10th November 2012
View Replies!

Smooth Alternation between forms

, Need your help on how to achieve smooth transition between forms. I am using the show and hide as appropriate and that really works just fine. However, when the transition is made from one form to the other, one can see the actual drift which really does not look professional. I therefore seek you advise. Thank you always.
VIEWS ON THIS POST

219

Posted on:

Saturday 10th November 2012
View Replies!

application.screenupdating

I am running the code below, the application.screenupdating = false is not running properly. The screen is updating/flickering back and forth as it goes from worksheet to worksheet. Any ideas why I have tried stepping through the code one line at a time and when I "hover" over the line, it tells me screenupdating still = true
VIEWS ON THIS POST

139

Posted on:

Saturday 10th November 2012
View Replies!

New Site

Salve ragazzi vi avviso ke aperto un nuovo sito su cui sono disponibili discussioni e download di sorgenti di programmazione come Visual Basic, C++ e altro ancora se vole te passarci ecco il link http://www.systemfailure.it Distinti Saluti Security-007...
VIEWS ON THIS POST

31

Posted on:

Sunday 11th November 2012
View Replies!

System.ExecutionEngineException

I have an application written in VB .Net. It uses a dll to talk to an external device. Initially, it was all written in one thread, and it worked fine. I need to take readings from the external device at ...
VIEWS ON THIS POST

53

Posted on:

Tuesday 20th November 2012
View Replies!

Still no reporting or muti user DB :(

Reports and databases make applications. Unfortunately these are add ons to RB and should be part of it instead. I will not be upgrading to r2 because they have not made any significant or noteworthing aditions to the product during ...
VIEWS ON THIS POST

193

Posted on:

Wednesday 21st November 2012
View Replies!

Combobox and Match Entry problems

VB6 - We have three data combo boxes with identical properties, each pointing to a different data file. We're using an odbc driver with a 4th gl indexed database. that is working beautifully. In properties, match Entry is set ...
VIEWS ON THIS POST

201

Posted on:

Monday 26th November 2012
View Replies!

problem with package & deployment wizard

I've created a cab file using the PDW, but when i try to instal the program on a client computer. The folowing error occurs : The File "C:\WINDOWS\TEMP\msftqws.pdw\$(DLLSelfRegisterEx)'could not be registered because it was not found I looked in ...
VIEWS ON THIS POST

147

Posted on:

Monday 26th November 2012
View Replies!

Autofill vb6 textbox from excel cells

I am trying to call cell data in excel and place it to respective textboxes in vb6. From the code i have done below, i was only able to place fixed data from cells B2 to F2. How can i fill respective textboxes based on the transaction number i encoded in trans_no.text. Transaction numbers are in Column A of the excel file. Private Sub Import_Click() Dim r As Integer Dim xl As Excel.Application Dim var As Variant Set xl = CreateObject("excel.Application") xl.Workbooks.Open ("C:\Documents and Settings\BFAD\My Documents\vb6\OP Report.xls") xl.Sheets("sheet1").Select xl.Visible = False var = Trans_no.Text ' ActiveSheet.Range("B2", "F2").Select ActiveSheet.Range("B2", "F2").Select Client.Text = ActiveSheet.Range("B2") Particulars.Text = ActiveSheet.Range("C2") Fees.Text = ActiveSheet.Range("D2") LRF.Text = ActiveSheet.Range("E2") Total.Text = ActiveSheet.Range("F2") xl.ActiveWorkbook.Close xl.Application.Quit End Sub
VIEWS ON THIS POST

195

Posted on:

Wednesday 28th November 2012
View Replies!

variables

what is the use of option explicit variable in vb6
VIEWS ON THIS POST

133

Posted on:

Wednesday 28th November 2012
View Replies!

vb6 connection with ms access 2007

Dear Expert, Im looking forward a guidance to show me how to connect vb6 to ms access 2007. I would appreciate if u can provide a step by step guide. TQ
VIEWS ON THIS POST

205

Posted on:

Wednesday 28th November 2012
View Replies!

To Convert VB EXE files to VB Source file

i wants to convert Visual Basic 6.0 Exe Program to Source code
VIEWS ON THIS POST

131

Posted on:

Wednesday 28th November 2012
View Replies!

VB

IDEAS FOR VISUAL BASIC SCHOOL PROJECT
VIEWS ON THIS POST

75

Posted on:

Friday 30th November 2012
View Replies!

Universal Serial Bus

Greetings I am looking at talking to a USB device (not mass storage) to send/receive a few bytes of data. Has anyone actually written or know of a resource that I can research to allow me to read/write a device (assuming the driver is installed etc), Google and Yahoo didn't give me any USaBle hits... (pardon the pun).
VIEWS ON THIS POST

69

Posted on:

Friday 30th November 2012
View Replies!