Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Fetch Progress Of ADO


I want to use the FetchProgress event of ADO.If some body has a small sample code ,It would be thankfull.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Fetch The Last One
HI
lets say im writing this 1:
select * from table where field=value

this query gives me few results but i only want the last 1
how can i tell it to give me just the last result?

Go Fetch!
I need to do a procedure that will go in to a web site,
get his source, add every link to a ListView and will
be able to show the link in a WebBrowser Control.

Fetch Bandwidth
How to find the Server Bandwidth using VB 6.0 or VB.Net

smani

Cant Fetch Data...
i used this statement to fetch data:

VB Code:
set rs = con.execute("select * from gljv_lbrcrdt")


to my dismay.. it returned no data...

but when i used it to get data from other tables, it works fine...
what's wrong with this,..... please do help me...
what might be the reason why i cant fetch data from a certain table?

How Can I Fetch Data From A Url
hi,

i want to fetch data from a url and display it on my VB Application. The url will be http://127.0.0.1/default.asp?mode=xml

when i go to that url i am given data as follows:

<ACTIVE>64</ACTIVE>

i want the code to just fetch the value of ACTIVE, in this case the example would be 64.

Then i want the code to add a number to the above depending on the time of the day.

If the time is between 00:00 - 04:00 + 32 to ACTIVE value
If the time is between 04:00 - 10:00 + 24 to ACTIVE value
If the time is between 10:00 - 13:00 + 43 to ACTIVE value
If the time is between 13:00 - 18:00 + 49 to ACTIVE value
If the time is between 18:00 - 22:00 + 84 to ACTIVE value
If the time is between 22:00 - 24:00 + 65 to ACTIVE value


And finally the fetch should appear every 30 seconds and display the total value in My App.

Any suggestions would be very much appreciated.

Many thanx in advanced.

Cheers
Kelly

Msmapi3.ocx Fetch
I am using msmapi3.ocx.
When I am using .Fetch command the application hangs.

When I am using CODEMAPIMessages1.Fetch

MshFlexGrid / Fetch Row X Row
Hi guys
This is my 1º message here...
I'd like to ask you a question... I'm starting with VB and would like to know:

How could i do with MsshFlexGrid to add row x row to it, taking rows from mdb db ?

I need pre-formatting before adding each row to the grid...

Any examples, any easy code to do this plz ? Thanks a lot in advance...
 

Fetch Data From A Jsp In A VBA
hi all
can any one help me
i have made a document that takes user input and shows a form that have webbrowser control and post that data to a jsp now jsp fires a query taking the userinput posted to it from webbrowser control ,jsp has a form that has a button which on click calls the same initial document using
<form name="f1" action="/rndsave.doc" method="post"> and sending the result of the query now i need to fetch that result only in the VBA document how do i do it

How To Fetch A Piece Of The Background ?
How can I fetch a certain piece from the background and store that piece into a picture ?

Let's say I want the 50,80-170,240 to be stored in a picture (picture1)
How can that be done ?

Fetch Info From Two Tables
I have two Access 2003 tables:

TableMain

Code:
MID PO TE INFO
1 2 3 ABC
2 2 1 EREER
3 1 3 OIUOI
4 3 3 PERE
5 2 2 DFE
TablePerson

Code:
PID FIRSTNAME LASTNAME
1 Joe Smith
2 Cal Jones
3 Bill Carson
I would like to get this output if I query for a MID number such as 3:
Code:
Firstname Lastname Firstname2 Lastname2 Info
Joe Smith Bill Carson OIUOI
My attempt below only fetches one name and ignores the TE value.

Code:
select * from TablePerson INNER JOIN TableMain on
TablePerson.PID = TableMain.PO
where TableMain.MID = 3

Another example if I query for MID number 5 I should get this:
Code:
Firstname Lastname Firstname2 Lastname2 Info
Cal Jones Cal Jones DFE

Please advise

How To Fetch Data From Notepad? Please Help
I want to know if there are codes in vb6 that can fetch data in notepad. If one doesn't exist please tell me an efficient way to retrieve those data and use it in my program. thanks for advance

Anyone Can Help Me With This Mysql Fetch Form ?
VB Code:
If CNN.State <> 0 ThenSet rsshow = CNN.Execute("select * from status")    Do While Not rsshow.EOF    txtChat = rsshow(1)    Loop        CNN.Close    End If

[Urgent Help]How To Fetch E-Mail From VB
Hi All,

Can any body please help me out to read mail from "Microsoft OutLook" . My requirement is to read mail from "Microsoft OutLook" , which is configured for some other domain say microsft.com. I need to divide the mail into "From"/"To"/"Subject"/"Message"/"Attachment" and then put these objects in database.

Tx in advance.

Bulk Record Fetch
my application is taking a long time to get more thank 50,000 recodrs in a ADO recordset from Oracle 8.16 Database and display it into a VideoSoft FlexGrid control. I introduced pagin to show not more than 250 records for page. But am still getting hit on the fetch time which amounts to more than 10 minutes..
Is there any way to get the records faster or in pages.
Earliest response appreciated.

Fetch Data From Commandline?
Hiya!

Id like to start a app from w webbrowser like this:

c:appsmyApp.exe?value

How do I fetch the string "value" in my app? I tried something like environment.commandline in the form_onLoad but ofcource that was wrong...

Any help would be deeply appreciated!

Fetch Complete Event
If a RecordSet.Open command has a valid SQL query parameter supplied to it, will it raise the "FetchComplete" event when the row retrieval operation is complete? If not, what operations will raise this event?

Msmapi32 Fetch Problem
I am using msmapi3.ocx.
When I am using .Fetch command the application hangs.

I been googled and saw this link.
I am using Win XP machine and our mail Server is Exchange 2000.
http://support.microsoft.com/default.aspx?scid=kb;en-us;176484


Any help is appriciated.


George

How To Fetch The Computer Name In A Network
Does anybody know how to fetch the computer name of a particular computer in network thru code?

Thanks!

PS. Thanks to Ferlin and chiph for responding to my question. It helped me, guys, a lot.

Fetch Data From OleDbDataReader
I want to receive the last Unique Identifier from a table.
I have already this code:
CODEDim myCommand As New OleDbCommand("Select max(Id) as LastId from Translation", OleDbConnection2)
                OleDbConnection2.Open()
                Dim myReader As OleDbDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

Need To Fetch Word From A Site
Can anyone help me in developing VB code to find given Keyword is available or not to search in particular website.please its really needed for me

thanks and regards
babu


 

Fetch As Needed Recordset
Dear friends,
I am working on the ADO on Oracle and I want to fetch record as needed basis. If someone can help me for the method to use to get the records as needed from the database. I am using the server side cursor and want to use the disconnected recordset.
Thanks in advance.

Fetch GUID Using DLL Path
Hi,

I am trying to figure out how to fetch GUID of a registered DLL using it's file path.

I know the path of the DLL server (ex: C:Program FilesExample.dll) and the DLL is registered during the time it is created on my machine.

Any idea to do this would be greatly appreciated.

Thanks,
Ravi.

Cool Progress Bar V2.0 - Skin Your Progress Bars Or Use Nice Color Gradations!
Hey, I've made this neat control that works just like any progress bar, but you can choose an image for the background and another one for the foreground!

Now, here's the fun part: you can tell it to automatically draw a gradation or solid box to these images!

Full source code + OCX included (and a nice demo). Have fun

Fetch Hdd Serial Number (firmware)
hi,

I felt since a couple of days in a problem and searching for help. I can determine the hdd serial number printed by the manufacturer using a code i found some where in the forum, but when i tested the code with vista the outputs are empty.

I searched on the web and found there is an extension using WMI but i tried it with my vista lite installation and it doesnt work.

I would be glad if somebody can help

thanks

Fetch Oracle Blob Into ASP Page
Hi @ll!

I need to insert into and fetch images from Oracle 9i database. I already know that I'll need a BLOB type.

I'm using a ASP page for image showing but all the code (insertion and retrieving of the Blob) shall run in a VB6 COM.

I already done some research but didn't find much... so my questions are:

Has anyone done this via VB?

Does Anyone know how to fetch an Oracle BLOB field?

Does anyone know how to display an Oracle BLOB field?

Does anyone know how to print out an Oracle BLOB field?

Thanks in advance for help.
Pedro

Fetch Names By Alphabetical Order
I have a table with a field called name.

I store first and last name in this field but now I want to fetch all the names in this table by alphabetical order by last name:


How can I split up the name table data to then fetch the last name by alpabetical order? Each name has a first name then a space then the last name so I was hoping to split up the first and last name and then fetch the last name by alphabetical order in a query:

Current listing in my field called name
John Smith
Rober Jones
Jim Accorn



Query Results I want to get:

Jim Accorn
Robert Jones
John Smith

Please advise how I can do this?

MAPI Fetch Causes Form To Flash
I am having an odd issue with the MAPIMessage.fetch command. It runs fine, but when I do not have focus on the application it is tied to, the computer makes the form 'flash' and the taskbar icon flashes as well. I am trying to do one of two things:
1. Stop the timer when the specific form loses focus
2. Not make the form flash when the form loses focus

I am programming in VB6 and am using Vista SP1 as an OS. I have not yet tried this on XP.

Thanks in advance

MAPI Fetch 32002 Error
I'm trying to write a program that can pull in an email file from a mail server. I can send just find, but receiving is the problem ><. Every time I use MAPIMessages1.Fetch, my program crashes and gives me the 32002 error! I am running Vista and have not yet tried this on an xp machine. Here is a section of the code:

Code:
Private Sub Form_Load()
'Sign on to the MAPI Session
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Fetch
If MAPIMessages1.MsgCount > 0 Then
'If there are messages, display the first one.
txtFrom.Text = MAPIMessages1.MsgOrigDisplayName
txtTo.Text = MAPIMessages1.RecipDisplayName
txtSubject.Text = MAPIMessages1.MsgSubject
txtMessage.Text = MAPIMessages1.MsgNoteText
'Enable the buttons to allow message navigation.
cmdBack.Enabled = True
cmdForward.Enabled = True
cmdSend.Enabled = True
Else
'No Messages? Tell the user immediately and Sign off!
MsgBox "You have no messages”"
MAPISession1.SignOff
'Disable the buttons to avoid error messages
cmdBack.Enabled = False
cmdForward.Enabled = False
cmdSend.Enabled = False
End If

Can someone help me out?

How To Fetch Values From Mysql And Use It In A Loop?
Hi all i got an application that takes url value from users .The user types the url in textbox and click a sommand button and ...

i have list of urls in my database i want my program fetch the url value from my database and use it instead..

So if i have 20 url records in mysql db i want my Private Sub Command1_Click(Index As Integer) runs 20 times and takes the url from db and pass it to rest of function. I be happy if some tell me how i can do that.Thanks




VB Code:
Private Sub Command1_Click(Index As Integer) Select Case Index    Case 0:        If txtURL.Text <> "" Then            [b]RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)[/b]        End If        Case 1:        EndEnd Select Command4_Click ' calliing the remaining function within the loopEnd Sub



Mysql connection

VB Code:
Dim CNN As ADODB.ConnectionSet CNN = New ADODB.ConnectionCNN.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=visualbasic66;USER=root;PASSWORD=;OPTION=3;" CNN.Execute "select url from sheet1 "

How To Fetch Random Record From Database?
Hi,

I have a combo box in which i have a list of names. When i click on any name the date related to it like reference number, address etc should be visible in textboxes. This information is already saved in the database by other form. I am calling the data from the database with the help of the name from the database.

Now my problem is whenever i click on any of the names instead of showing the row related to that name, its collecting the last record from the database and displaying it. I am sending the code so that u guys can have idea wats wrong in the code


VB Code:
Private Sub cboClients_Click()On Error GoTo HellDim rsEDetails As ADODB.RecordsetDim EDetailQuery As StringDim I As Integer    mShowPrevious = True    EDetailQuery = " SELECT * From EventPlanner WHERE 'ClientName = " & CboClients.Text & "' "    Set rsEDetails = gfOpenRecordSet(EDetailQuery)    With frmEventReoprts        .msfEventPlanner.Clear        .PopulateTitles       I = 1        Do While Not rsEDetails.EOF            If I = 1 Then            Else            .msfEventPlanner.AddItem ""            End If        .TxtEvent.Text = rsEDetails(1)        .TxtEventDate.Text = rsEDetails(2)        .TxtTimeFrm.Text = rsEDetails(3)        .TxtTimeTo.Text = rsEDetails(4)        .TxtLocation.Text = rsEDetails(5)        .msfEventPlanner.TextMatrix(I, 0) = rsEDetails(6)        .msfEventPlanner.TextMatrix(I, 1) = rsEDetails(7)        .msfEventPlanner.TextMatrix(I, 2) = rsEDetails(8)        .msfEventPlanner.TextMatrix(I, 3) = rsEDetails(9)        .msfEventPlanner.TextMatrix(I, 4) = rsEDetails(10)        .TxtTotal.Text = rsEDetails(11)        rsEDetails.MoveNext        I = I + 1        Loop        .Show    End With  Exit SubHell:    MsgBox "Description: " & Err.Description & vbCrLf & _    "Number: " & Err.Number, vbOKOnly + vbInformation, "Error - Called from " & Me.Name & " Sub Form_Load"End Sub



Can u guys please help on this??


regards,
kaushik

How To Fetch And Display Data From 2 Tables?
I have try problem trying to display data from 2 tables.
Btw, I also have another question is that I would like to capture what the user has clicked from earlier page.It is a submit button. i should capture the submit name rite. But when i clicked on the submit button, it capture the submit name but then it does not display the desired data i want.

If it is not using button to capture what the user has entered in the earlier page, if using normal links, how do i do it???

How To Fetch Data Within A Given Date And Time
Hi,

1. I am using Access2000 database in which i am logging the data for every 1 sec with date & time. I am using Date/Time field type for logging the date and time. While retrieving the data from vb6.0, I gave the sql query as

"select * from log_data where log_date between datevalue('" & cdate(date1) & "') and datevalue('" & cdate(date2) & "')"

And I got the records within that date and time. After that I gave the query as

"select * from log_data where log_date between #" & cdate(date1) & "# and #" & cdate(date2) & "#"

And my recordcount is greater than expected records .So tell me the difference between # and datevalue function and also tell me Is there any other way to retrieve the records.I am using ADO for connecting the database to my application.

2. Since I am logging the data for every 1 sec, my database size is greater than 2GB.So I compacted database using compactdatabase method.Even then an error comes stating that "Check whether Disk is not full" . My harddisk size is 40MB which I partitioned it to 4 drives.Tell me how to split the database and how to access from VB application.

Thanx in advance...

Fetch Last Record From Duplicate Values
Hi, i have a sql table where there is no primary key defined on the key field (123 below) as it contains duplicates. From the below sample data if i need to know which is the last updated record what should i do ? In Foxpro the below is achieved using the scan() function.. pls help me with the query in VB as i have been struggling since long to get this up working.


Num Delvd Date Time Delay reason Entry_date Time

123 2002-09-03 0600 CUSTOM HELD NULL 2002-09-03 1209
123 2002-09-03 1600 CUSTOM HELD NULL 2002-09-03 1640
123 2002-09-04 1700 CUSTOM HELD NULL 2002-09-04 1734
123 2002-09-08 0900 CUSTOM HELD NULL 2002-09-08 1014
123 2002-09-12 1600 CUSTOM HELD NULL 2002-09-12 1635
123 2002-10-08 1500 NULL SIGN 2002-10-09 1505

How To Fetch Values From Mysql And Use It In A Loop?
Hi all i got an application that takes url value from users .The user types the url in textbox and click a sommand button and ...

 i have list of urls in my database i want my program fetch the url value from my database and use it instead..

So if i have 20 url records in mysql db i want my Private Sub Command1_Click(Index As Integer) runs 20 times and takes the url  from db and pass it to rest of function. I be happy if some tell me how i can do that.Thanks



CODEPrivate Sub Command1_Click(Index As Integer)

Select Case Index
    Case 0:
        If txtURL.Text <> "" Then
            RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)
        End If
    
    Case 1:
        End
End Select

Command4_Click ' calliing the remaining function within the loop
End Sub

How To Fetch Any HARDWARE SERIAL NUMBER?
Hi Friends,

I have developed a new software which i am thinking of marketing.But i am afraid of getting pirated .So i decided to fetch CPU or ANY hardware id of the client machine and based on that id my software will show a number.Which the customer will call me and tell me that number.Against that i will issue a unique number matching that generated number and he can run the software happily without any problem.

So can any body help me or tell me that how can i fetch the hardware serial number.

Thanks in advance to all of you.



regards
friendsterindia







 

SUM() Problem Among Fetch From Multiple Tables
The Query:Code:SELECT
ProductTotal.Product_ID,ProductTotal.Sales,
SUM(Profit.Sales_Vending+Profit.Sales_Other) AS TotalSales,
Description.ProductName,Description.VendingCode
FROM
ProductTotal,Profit,Description
WHERE
ProductTotal.Component_ID=5112 AND ProductTotal.FiscalYear=2003 AND ProductTotal.FiscalPeriod=10 AND Profit.Component_ID=ProductTotal.Component_ID AND Profit.FiscalYear=ProductTotal.FiscalYear AND Profit.FiscalPeriod=ProductTotal.FiscalPeriod AND Description.Product_ID=ProductTotal.Product_ID
GROUP BY
ProductTotal.Product_ID,ProductTotal.Sales,Description.ProductName,Description.VendingCode
ORDER BY
ProductTotal.Product_ID

The Problem:
The SUM() field gets the totals for the first row, but duplicates the value to all the subsequent rows (See Attachment)

The Solution:
uh...

-------------------

I'm not strong enough in SQL to figure why the SUM() field is not going by the ProductTotals.Product_ID. I put the GROUP BY fields in the order that I listed them in the SELECT list. Maybe I should switch them around?




Edited by - Metallisoft on 6/2/2004 10:05:10 AM

Fetch Details Of Employee With 2nd Highest Sal
What query do i fire to fetch Details of Employee with 2nd highest sal.
I'm using SQL-Server 2000.

Regards,
Deepa

How To Fetch A Password Protected Webpage?
Hi,

There are many many examples of how to simply get a NON protected page, but none it seems on how to get one where you need the password. I'm looking for such a thing. Ideally something like:


a=GetWebPage("http://www.blabla.com/blabla.html","username","password")


I don't need to display anything, just get the full page content in a string

Is that possible without buying some extra control?



Edited by - klipklap on 7/5/2005 5:46:09 PM

Datagrid Doesnt Fetch Data
hi,

i get an error with this code, any suggestions please

Private Sub Command1_Click()
Dim table, str As String
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

table = DataCombo1.Text
str = "select * from " & table
cn.ConnectionString = "dsn=test;uid=test;pwd=test"
cn.Open
Adodc2.RecordSource = adCmdText
Adodc2.Recordset.Open str, cn, adOpenDynamic, adLockOptimistic

If rs.BOF And rs.EOF Then
MsgBox "no record"
Else
Adodc2.Refresh
DataGrid1.DataSource = Adodc2 ' get an error here --- method or data member not found
DataGrid1.Refresh
End If
End Sub


thanks.

RollbackTrans - Fetch Type Out Of Range
I have ON ERROR in my Procedure and I am using dbconn.BeginTrans to start a Transaction.
I have some select statements (open recordset, selecting sequence # from dual in ORACLE) and some update statements inside the transactions.
When I get some error on Updates the control is coming to ON ERROR block, I have dbconn.RollbackTrans there to rollback all changes. On executing dbconn.RollbackTrans I get the following error

Runtime Error 40002
S1106[Microsoft][ODBC Cursor Library]Fetch type out of range

Please advise me how to execute RollbackTrans without getting the above error.

How To Show Progress In Progress Bar For Long Running Queries
Dear Friends,

I am executing following statement...

*****
Con.Execute "sp_MyProc '21-12-2002' "
*****

In this execute statement I'm executing a stored procedure which takes time from 1 sec. to even 1 or 2 hours, depending on the date which I'm pasing to the procedure. Here whole processing is done in database only not through VB.

Even sometimes I may fire long running queries in MS-SQL or MS-Access or ORACLE.

So in these situations how can I show the progress in my Progress Bar.

Even sometimes I'm doing such a processing that I'm not able to keep track of how much processing is done and how much is left. Please tell me how can I show progress in the prgressbar.

Kindly attend my problem.

Regards......
- Charansing..............

Null Date Insertion And Fetch Problem
Dear folks,

I have a problem with date insertion/fetch,
IT IS a DIFFERENT SORT - I HAVE SEEN ALL PREVIOUS POSTS!
HOW CAN I INSERT 20 NULL DATES USING A SINGLE QUERY AFTER VERIFYING THE DATES?
I DONT WANT TO USE IF-ELSE FOR ALL THE DATES AND HAVE SEPARATE 40 QUERIES.

---
i am using vb6 with access 2000 mdb.
regional setting date as : dd/mm/yyyy
i have 20 different date fields having data type Date/Time.

1. when i fetch records using data type Date/Time, they fetch correctly ccording to from-to date values given by date picker...
- But when i insert these dates in mdb, if there are null date fields, it gives an error.


2. Now when i change the data type to Text, the null date fields are inserted in tables successfully...
- But then I have a problem with the fetch from-to date query. here if i select from-to dates as 01/01/2007 to 31/01/2007 , i get records of the 01/2006 as well! I dont know why?

I tried many ways in my sql query, but i coulnt solve neither the null date problem nor the fetch problem.

HOW CAN I INSERT 20 NULL DATES USING A SINGLE QUERY AFTER VERIFYING THE DATES?
I DONT WANT TO USE IF-ELSE FOR ALL THE DATES AND HAVE SEPARATE 40 QUERIES.

sql queries as follows:

Code:
INSERT INTO TABLE1(dateField1) values(#2007/12/12#)
if the datatype is DATE/TIME------> I am Not able to instert NULL VALUES

SELECT * FROM TABLE1 WHERE dateField1 = #2007/12/12# I am able to fetch any VALUE

INSERT INTO TABLE1(dateField1) values('" & dtp_from.Value & "' )
if the datatype is TEXT------> I am able to instert NULL VALUES BUT can not fetch correct date between records

if text data type i am not able to fetch
SELECT * FROM TABLE1 Where dateField1 Between '" & dtp_from.Value & "' And '" & dtp_to.Value & "' "

OR USING DATATYPE DATE
SELECT * FROM TABLE1 Where dateField1 >" & dtp_from.Value & " And dateField1 < " & dtp_to.Value & " "



must i upgrade to access 2007?
is there a way to fetch date between records using datatype as text? how should the sql be?

please help!

thanks and regards
cingo

How To Fetch Rows From Access File Into ListBox?
Hi all... I have problem on fetching rows from an MDB file and then list them all into a ListBox control in VB. Below is my code (using ADODB connection) that apparently still has error in it...


VB Code:
Private Sub Form_Load() Set rs = ConnOpen Do While rs.EOF = False     msgbox rs.Fields("Cam_Location")    ListAll.AddItem rs.Fields("Cam_Location")        rs.MoveNext    Loop End Sub


The messagebox could shown up and give the information I wanted (means that there's nothin wrong with the connection to database), but after that there's error that says : Run-Time error '94' : Invalid use of Null and the ListAll.Additem line is highlighted...

So, how am I suppose to add listbox items with the information I get from the database (Access file)??

thanks in advance, guys

Fetch A Text File From Http Server
hi i am creating a new code for my project

but i want to know if there is an possibility to fetch an text doc from a http server and put the text into form1.text1.text

it's purpose is to just fetch the text but not the file.
so it does not save the file to a location but just downloads the file
and i want to use a custom location like:

<fetch> http://server1.server.com/id2152/info.txt
i can change id2152 from form1.getid1.text
so it's always info.txt but only the dir changes..

does anyone knows an code for this ?

How To Connect To Mysql Database And Fetch The Records
I used ADO to connect to the mysql database on linux machine

My code:
Con.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=linux2;DATABASE=mydatabase;UID=uid;PWD=pwd;OPTION=3;"


And still my connection state is 0.

Pls reply me soon.

Thanx in advance...

Cursors Fetch -- SQL Server Store Procs.
Help.... Will u guys ???

I'm stuck with this cursors fetching.
I'm tryin' to make a store procedures to be called from VB 6.
Inside my store procs, I'm using cursors fetching to loop through my recordset opened from that store procs.

I've succeded in fetching the records,
but 1 problem occured :

the cursors always fetch twice for the last records.


Code:
CREATE PROCEDURE Test_Cursor
with recompile
AS

Declare @NoUrut as float
Declare @myCode as varchar(15)
Declare @mySale as varchar(40)

Declare Cursor_Testing Cursor
Local
For
select Sell_Code, Sell_Name from Tr_Sell order by Sell_Code asc

Select @NoUrut = 1
Open Cursor_Testing
Fetch Next From Cursor_Testing Into @myCode, @mySale
insert into tempTable(CodeSell, NameSell) select @myCode, @mySale

while (@@Fetch_Status = 0)
begin
Select @NoUrut = @NoUrut + 1
Fetch Next From Cursor_Testing Into @myCode, @mySale
insert into tempTable(CodeSell, NameSell) select @myCode, @mySale
end

Close Cursor_Testing
DeAllocate Cursor_Testing
GO



When I run the store procs, nd when it done, I try to select the recordset at tempTable,
the result is good. But, I found the 2 same records for the last records.

Is there something wrong with the store procs ?

any help would be appreciated.
Thx,
Wille

How To Fetch Data From A Database And Display It In A Form??
Hi,
i have one more query:

i have created a MS-Access database with my table having two fields: Name and Id. i have added around 5 names and corresponding ids in the table.
Now using VB, i have created a form that has a List view control. i have a button named 'Show' which when clicked should display the data in the list view from the table in the database.
can anyone help me out with pseudo code or some useful links/sites??
thanks in advance.

Fetch Text File From The Web Into ListView Control?
The "file.txt" is a plain ASCII line-delimited database:

Code:


first line here
second line here
another line here
few more lines
here some more
and here too
and more here
and so on



So far I got this:


Code:


Private Sub Command1_Click()
On Error Resume Next
ListView1.ListItems.Add = Inet1.OpenURL
End Sub

Private Sub Form_Load()
Inet1.URL = "http://www.server.com/file.txt"
End Sub



The above adds the whole file to the first line of ListView. Is there a way to fill ListView with "file.txt" line by line? I guess there should be a FOREACH statement somewhere to go over the database line by line adding each line to the ListView control.

Thank you in advance.

Pressing Enter Key To Fetch Fields From Access
hi all,
        i want to know that how can i write a code in which i can press enter key to fech values from a database.
suppose i press enter key in a text box and the fieds should appear in the program. i am able to do that with a command button.

Copyright © 2005-08 www.BigResource.com, All rights reserved