Member Avatar

##vbScript - A Multi-column Sort With Minimal Coding Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. A previous post dealt with sorting. The code easily handles sorting simple things like lists of words, lines of text - cases where you only had to compare two things. What about the case where you want the option to sort on an arbitrary column of data, or you want to sort on multiple columns such as by birthdate, then by last name. That becomes more difficult to code. Databases handle that with ease by allowing you to specify …

+0 forum 0
Member Avatar

I worked on a program a few years ago that takes data from a series of text files and loads an Access database. I added to the code from a program started by someone else, so I did not write the imports and declarations. They used an ADODB.recordset, addnew and recordset update to move the data into the table. My contribution was to extract information from some additional text files to send to the database. Here are the initial lines from the original program, which I tried to copy: Imports System.IO Imports System.Data.OleDb Imports System.Text.RegularExpressions Dim streamText As StreamReader Dim …

Member Avatar
+0 forum 2
Member Avatar

Add the snippet in your module. **Requirements:** * Make sure you have reference to M$ ActiveX Data Objects Library (ADODB) * A table field with OLE Object / BLOB as datatype * A recordset that is already oppened and ready to be use **To save Image on your table field, call `SetRSBlob` function** Make sure that your **recordset is already loaded or openned** Lets assume that our recordset `rs` is already oppened and ready to be updated. Dim ret as Boolean ret = SetRSBlob("C:\image1.jpg", rs, "image") TRUE will be returned if image was set to the recordset field. All you …

+1 forum 0
Member Avatar

I've a DataGrid Control in my application and a button. When i click a button it should display the contents of the Logins table in the DataGrid. For this I've coded the following, but its giving me an error "Rowset is not bookmarkable.". I've searched a lot, many suggestions include changing Recordset cursor type and cursor location. But those suggestions don't solve my problem.. thanks..!! My Code :: Private Sub OpenConnection() Set dbConnection = New ADODB.Connection dbConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & "G:\ShopManProject\" & "dbShopMan.mdb" dbConnection.Open Set dbCommand = New ADODB.Command Set dbCommand.ActiveConnection = dbConnection dbCommand.CommandType = adCmdText End …

Member Avatar
+0 forum 3
Member Avatar

Sometimes sorting data can be easy and sometimes it can be difficult. If you have data in a listview you can spend a great deal of time writing ICompare functions. This is appropriate for non-trivial applications but can be a little intimidating for inexperienced programmers. Also, it is a problem where the format of the input data changes. Detached recordsets provide a method which allows ad hoc sorting of data. With a little planning, they can be used to provide sorting for data where the number of fields is not known until runtime. Once you get the "messy" stuff out …

Member Avatar
+1 forum 1
Member Avatar

okay. Here's my problem. I have a form in which a Microsoft Hierarchical Flex Gid (fgdCompany) is used to display records taken from a database to relavent textboxes on the same form. When a record from fgdCompany is clicked, then the data in that record is shown on the textboxes. I have a button called cmdUpdate which should do the following when clicked : Once, the record is diplayed on the text boxes, a change could be made to it. And when cmdUpdate is clicked it should save the changes it made to that record and display the new updated …

Member Avatar
+0 forum 4
Member Avatar

hello! i have shifted my application from mssql server 2000 to mssql server 2005 , now the prob is the command object is not returning the recordset if command text is stored procedure , here is my code please check it and guide me through errors . [ICODE] dim cmdsp as command dim rs as new ADODB.recordset set cmdsp = new commadn cmdsp.activeconnection = cn cmdsp.commandtext = "MyStoredProcedure" cmdsp.commandtype = adcmdstoredproc set rs= cmdsp.execute 'here i got an error the state of rs is zero , but if i used this code at mssql server 2000 then it will return …

Member Avatar
+0 forum 2
Member Avatar

I have a continious Form which opens and shows records of people with whatever criteria the user had chosen the screen before. When the form opens it checks which button was pressed and then changes the recordsource of the continious form. When I try to edit the records it says "Recordset not updateable". I have done everything I can think of, I have change the type of recordset from dbopensnapshot to dbopendynaset. Any help would be great Tom

Member Avatar
+0 forum 5
Member Avatar

Hi Please can some one help me urgently with this I have the following code <% Dim productColors, myString, myArray myString = (prodRS.Fields.Item("prodColor").Value) myArray = Split(myString,",") Dim counter for counter = 0 to UBound(myArray) productColors = (myArray(counter)) Next %> Which works as intended in splitting the string What I now wish to achieve is a Recordset from another table which will return records with the same values as returned by the split string function eg: "SELECT * FROM tbl_color WHERE colorCode = ????" ???? being each of the values returned by the split string function If it makes a difference …

+0 forum 0
Member Avatar

I am trying to create a set of league table in MySQL and PHP. I can get the tables to show the top and bottom 5 values but the problem is when I have less than ten records in the system. When this occurs the same people can appear in the top and bottom league tables. Is there a way around this? Thanks

Member Avatar
+0 forum 5
Member Avatar

I have created a recordset to show the top 5 values in a database - this is then displayed as an include on a few pages. Is it possible to refresh these results every few seconds without having to refresh all of the page?

Member Avatar
+0 forum 2
Member Avatar

I have a php page that displays records from a sql database. Each record is in a repeat region and has a submit form nect to it. The problem is if I submit one of the forms below the first in the list, the first form is validated and the following error is displayed: Cannot redeclare process_form() (previously declared Is it possible to dynamically name the process so that it is different for each record?

Member Avatar
+0 forum 4
Member Avatar

Is it possible to show the details of each record from the recordset in a show hide way? Each record would have a title - I need the sliding div to show the relevant info when the title is clicked on. Don't know if i've made this very clear so have posted the currect code below. At the moment clicking on any record drops down only the very first record. [CODE]<?php do { ?> <a href="#" onClick="showSlidingDiv(); return false;"> <?php echo $row_candidate_details['Title']; ?> | <?php echo $row_candidate_details['Location']; ?></a> <br /> <div id="slidingDiv"> <p> <?php echo nl2br($row_candidate_details['summary']) ?>/</p> </div> <?php } …

Member Avatar
+0 forum 1
Member Avatar

I have a php page showing records from an sql database, when the user clicks on a link they are taken to a detail page with more info etc. All of this works fine - the issue is that I wiould like uses to be able to submit a form from this page with a file attached. I have the form as an include, with any data being entered into the form being sent to my email - this is fine. The problem occurs with some hidden fields with details from the recordset not being displayed, I don't know if …

Member Avatar
+0 forum 3
Member Avatar

Hi, I have a little problem with a macro I'm working at. I need to pull data from a database and then show it in an excel sheet. Everything work fine till the moment when I want to close the recordset . Then my application freezes and I have to kill the process from Task Manager. Here is the code [CODE] Dim spBasicInfo As ADODB.Command Dim rsBasicInfo As ADODB.Recordset ... 'some code On Error GoTo err_place Set_Connection Set spBasicInfo = New ADODB.Command Set rsBasicInfo = New ADODB.Recordset With spBasicInfo .ActiveConnection = dbConnection .CommandType = adCmdText .CommandText = "Raport_contacte_ora" .CommandTimeout = …

Member Avatar
+0 forum 1

The End.