VB Classic Database Tasks Topic

| Single user, multi-user, client server and n-tier database applications. |
|
|
Thread 25 of 25 | | Thread Starter | | |  khatib_b | No SubjectHi every body
I was able to designate an access Database as a custom source to a textbox to accomlish autocomplete property of the textbox. The problem is when I enter the first letter of a word I get about 15 autocomplete suggestions while in the DB there are more than 50 words beginning with that letter. Is there a way to make the whole words displayed in the autocomplete pop up box.
Thanks for your help |
 2342 Hits | |
Thread 24 of 25 | | Thread Starter | | |  jason_robertson | Query Access 2.0 from VB6Hi I am new to Classic vb
I have a really challenging problem, and I would be very grateful for any help ideas suggestions that any of you gun vb6 developers might have
I need to read data out of an Access 2.0 file format file from VB6 this has to be compiled and redistributed as part of a database upgrader, licensing constraints and the end user desktops prevent the use of a VBA runtime.
Thanks in advance
|
 1991 Hits | |
Thread 23 of 25 | | Thread Starter | | |  gilgal | how to write script (correct my script) for MSFlexHow do I make the script run through the database and write down the records of rs("book_title"),rs("chapter"),rs("verse"),rs("text_data") in a MSFlexGrid?, , Private Sub MSFlexGrid1_Click(), 'Private Sub Form_Load(), 'the format string just lets you define a format for how, 'your flexgrid will appear, MSFlexGrid1.FormatString = "Book |" & _, "Chapter |" & _, "Verse |" & _, "Text", , Dim connectionString As String, Dim query As String, Dim cn As New ADODB.Connection, Dim cmd As New ADODB.Command, Dim rs As New ADODB.Recordset, Dim Text1, , 'Text1 = Request("Text1"), , 'connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\kjv.mdb;User Id=admin;Password=;", 'query = "SELECT * from bible", ''query = "SELECT * from bible WHERE text_data LIKE %" & Text1.Text & "%", , , 'make sur... | 1 Reply: |  mprestwood | Instead of doing rs("FieldNameHere"), you should do rs.Fields("FieldNameHere"). I actually prefer specifying the .value property on the end too. |
|
 1667 Hits | |
Thread 22 of 25 | | Thread Starter | | |  raj74 | How to save the data from MSFlexGrid into a databaMy doubt is i am using MSFlexGrid to display the invoice details (detail table data).User can able to see the invoice data and also to edit the present data in the MSFlexGrid and also user can add new data (rows) in the MSFlexGrid.How i can do that?.I also like to know how user can delete a row from MSFlexGrid? | 3 replies. Last post: |  mprestwood | My understanding is that Microsoft recommends you use an auxiliary Edit control for doing the task. When you want to edit the text in a cell, you retieve the cell's rectangle and place an edit control over it. It's a bit complex but here's a tutorial:, , [URL=http://www.codeguru.com/Cpp/controls/controls/gridcontrol/article.php/c5291/]MSFlexGrid Edit Tutorial[/URL], , Is there a reason you can't use a DataGrid? |
|
 3935 Hits | |
Thread 21 of 25 | | Thread Starter | | |  akom | Dbase 7I need to connect to a database that is in Dbase 7 can I do that from Visual Basic 6? | 1 Reply: |  cheddar | this is way late but maybe someone else can use it. You should be able to find what you need here: http://www.dbase.com |
|
 1580 Hits | |
Thread 20 of 25 | | Thread Starter | | |  davidsplace | Text field remains blankI'm working on a database program using VB6. The database has a field called ID which is an auto-incriment field. My problem is when I press a button to insert a new record the ID field in the database is auto-incrimented but the text field on the form isn't. The number will not show in the text field until I exit the program and restart it. Can anyone help? |
 1316 Hits | |
Thread 19 of 25 | | Thread Starter | | |  Glenn.G | Replacing characters in a large fileI have a SQL server table that has been exported using bcp with the -n native option. I need to search through the file for carriage returns and linefeeds and replace them with a space., The file is a large address file (approx. 20,000 records). Does anyone have a utility to do this or can assist with the code?, The CR&LF cause problems with the bulk upload to our web site., Thanks, Glenn | 3 replies. Last post: |  cheddar | Use replace as you copy the data to a temp table. Then bcp the temp table. This way you do not modify the existing. , , Insert into TempTable SELECT Field1, Replace(Field2, CRLF, '') from Table, , or something like that |
|
 1484 Hits | |
Thread 18 of 25 | | Thread Starter | | |  Zapotec | Crystal Reports and Recordsets in VBcr_Report.Database.SetDataSource rs_Report, , Using that line returns the entire contents of the query table instead of the items in the query., , If I assign the recordset to an array the array contains ONLY the items I requested but when I assign the same recordset to the crystal report it contains ALL the items in the table., , Any help would be greatly appreciated., , Thanks,, , Mike | 1 Reply: |  southland | In order to get the right result from the table., I would write a stored procedure. CR would show the data base on this stored procedure. , , If it works, use VB to call this CR. Good luck |
|
 1612 Hits | |
Thread 17 of 25 | | Thread Starter | | |  rajeshjay | password character in input boxBefore closing a particular form, i am using an input box to enter the password, and validate authentication. but how do i use password characters like '*', for the data entered in the Input box., Thanks., the present code is ->, Private Sub Form_Unload(Cancel As Integer), , Screen.MousePointer = vbDefault, Dim pwd As String, pwd = InputBox("Please enter the Password"), If (pwd = "raj") Then, Cancel = 0, Else, Cancel = 1, MsgBox "Sorry you dont have the authority to close this", endif | 1 Reply: |  dhoyle | The problem is you can't get to the properties of the Inputbox function. One solution would be to create a new form with a textbox control and you can set the passwordchar to "*". Alternately you can use the following code to make the inputbox do it...(please note that it's not mine, I swiped it form another message board)., , Declarations: , , 'PUT BELOW DECLARATIONS IN A .BAS MODULE, , Option Explicit, , Private Declare Function FindWindow Lib ... |
|
 2628 Hits | |
Thread 16 of 25 | | Thread Starter | | |  ssharrock | Bind param based stored proc recordset to dbgrid uHi all,, , Struggling to find an exact answer to my problem in any reference material I have and was hoping that someone could help me ASAP .. I am trying to use a parameter based stored procedure in SQL Server 7 to return an ADO recordset and then bind it to DBGrid in VB 6 (SP5) .. At the moment I am getting the 7004 'Rowset not bookmarkable' error returned .. Here is both the source code and the stored procedure that I am currently working with .., , Stored Procedure (Basic version of), ----------------------, CREATE PROCEDURE dbo.up_find_family, (, @family_name varchar(40),, ), AS, DECLARE @sql varchar(1000), , SET NOCOUNT ON, , SELECT @sql = '', , SELECT @sql = 'SELECT * FROM family WHERE family.name LIKE ''%' + @family_name + '%''' + ';', , EXEC(@sql), , RETURN(0), , VB Code, ----------, Public Sub FindFamily(), Dim rs As New ADODB.Recordset, Dim cmd As New ADODB.Command, Dim tFamilyName As New ADODB.Paramete... |
 923 Hits | |
Thread 15 of 25 | | Thread Starter | | |  Salman Hussain | Database Encryption or hiding from user...I have developed a database program in Visual Basic 6, using Access to persist the data. How can I encrypt my Access Database so that no one can open my database to modify except me. Because by double clicking on the database, opens it in Access. | 1 Reply: |  jdschram | password lock the database...., TOOLS -> SECURITY -> SET DATABASE PASSWORD, , you need to open the DB Exclusively, , also you can hide the tables by , TOOLS -> OPTIONS -> view tab, and uncheck all boxes in the show area, This really isnt secure, but if someone happens to guess the DB password they still have to know how to make the tables visible... |
|
 986 Hits | |
Thread 14 of 25 | | Thread Starter | | |  Mike Rock | 16-bit ODBC to sql server problemI am trying to access Sql Server 6.5 and 7.0 using 16-bit ODBC (vb 3.0). The program uses two methods to execute stored procedures..., DB_SQLPASSTHROUGH - gets "invalid argument", SQLPREPARE --> SQLEXECUTE get "Stored Procedure" "not found", , I have tried using "dbmssoc3" and even "dbnmp3" as network libraries, but that did not help., , I expect that I have something wrong with my ODBC setup., , Any ideas? I have searched the web, but cannot find much help. Maybe an install of the latest version of 16-bit ODBC might help, but I cannot find it. I did install Access 2.0 attempting to get a more current 16-bit ODBC., , Help! |
 851 Hits | |
Thread 13 of 25 | | Thread Starter | | |  Peter Ferber | Assigning Bitmap to Access "OLE Object" Hello:, , I am using Microsoft Access 2000, and I'm experimenting with creating a program directly in a an Access VBA module and VB 6. , , I have a directory containing over one-hundred bitmap files, and I've constructed a table in Access that contains an "OLE Object" field to which I wish to assign, one by one, a bitmap file. , , In my particular case, each bitmap is a screenshot of a numbered test question. The following is a skeletal view of two attempts I made to implement the code, neither of which worked:, , Dim MyApp As Access.Application, Dim MyDB as Database, Dim MyRcd as DAO.Recordset, , Dim strDir as String, Dim strFile as String, , Dim iCount as Integer, , Set MyApp = GetObject _, (strDB, "Access.Application"), Set MyDB = MyApp.CurrentDb, Set MyRcd = MyDB.OpenRecordset _, ("Quizes", dbOpenDynaset), , For iCount = 1 to 100, strFile = strDir & "\Question_" & _, iCount & ".bmp", , '***1st attempt**... |
 1116 Hits | |
Thread 12 of 25 | | Thread Starter | | |  Peter Ferber | Using VB to assign bitmaps to OLE Object FieldHello:, , I am using Microsoft Access 2000, and I'm experimenting with creating a program directly in a an Access VBA module and VB 6. , , I have a directory containing over one-hundred bitmap files, and I've constructed a table in Access that contains an "OLE Object" field to which I wish to assign, one by one, a bitmap file. , , In my particular case, each bitmap is a screenshot of a numbered test question. I was attempting to use a DAO record object to implement the insertion, and the following is a skeletal view of two attempts I made to implement the code, neither of which worked:, , Dim MyApp As Access.Application, Dim MyDB as Database, Dim MyRcd as DAO.Recordset, , Dim strDir as String, Dim strFile as String, , Dim iCount as Integer, , Set MyApp = GetObject _, (strDB, "Access.Application"), Set MyDB = MyApp.CurrentDb, Set MyRcd = MyDB.OpenRecordset _, ("Quizes", dbOpenDynaset), , For iCount = 1 to 100, strFile = strDir ... |
 1749 Hits | |
Thread 11 of 25 | | Thread Starter | | |  Evaristo | Vb+Access+IndexesI need to use indexes in an VB Application that uses a ADO to access to an access 2000 database., To use de index and seek instructions I need to use de server side cursor location?, When I do these my recordset object loses all is potentialities like movefirst, movelast etc., How can I use permanent indexes (not the sort method with the optimize property) without losing the versatility of the recordsets., , If you can, please help me as soon as possible , , My best regards , Evaristo Figueiredo |
 870 Hits | |
Thread 10 of 25 | | Thread Starter | | |  olivern | Exporting separate Access Tables to tab delimited Hello, I am trying to export separate MS ACCESS tables inot a tab delimited text file. Does anyone know how this can be accomplished? |
 1053 Hits | |
Thread 9 of 25 | | Thread Starter | | |  dadrivr | Writing to/Deleting from a DatabaseIs there a way to write fields to/delete fields from the database in vb? Example:, I am creating a user login program. I want there to be an option to create a user, so I want to be able to write that user's information to the database. I also want to be able to delete a specific user from the database. |
 807 Hits | |
Thread 8 of 25 | | Thread Starter | | |  Shaul | Using Data Link File(.udl) in Data environmentHi Everyone, , , I have designed a data report using the Visual Basic 6 Data report designer and the report works fine when I use a data environment. , My problem is that I have now moved the database to a remote PC on a LAN and I would like the flexibility to change the database location using a Microsoft Data Link(.udl) file. , I have created the udl file but do not know how to specify it as the source for connection parameters in thr data environment. It does not let me use "file name = myUdlFile.udl" anywhere - not in the ConnectionSource, not in the Data Environment Initialize method, NOWHERE! , Please can someone tell me how to use a udl file to specify the database location for a data report, either using it in the data environment or somewhere else. Can I just create some sort of data environment manually and the use the udl file? , , , Shaul |
 1139 Hits | |
Thread 7 of 25 | | Thread Starter | | |  vearn21 | vb+mysqlhi.., just wanna ask about vb+mysql db., i tried to update field that have datatype date but it not work., , dim mydate , dim mydate12 as date , , mydate12=format(now,"yyyy-mm-dd") , 'mydate12=2002-04-29 , , mydate=format(now,"yyyy-mm-dd") , 'mydate = 2002-04-29 , , sql = "UPDATE customer SET date_keyin=" & mydate & "," & "user_name=" & "'ihan'" , sql = sql & " WHERE (id_no =" & txtID & " AND ref_no=" & "'" & txtNoRef & "')" , conn.Execute sql , , i wanna update date_keyin field., if i use mydate variable, it insert null value but when i use mydate12 it work but it insert value 2000-00-01., why? how can i update the true date. using 'now' command. any suggestion?, , thanx | 2 replies. Last post: |  vearn21 | hi..thanx..i already check it and it must have a "'" before the date field., , , okeys..this error come when i insert new data into mysql db using myodbc connection.coz of this error i don't use myodbc., , run time error -2147217887 , multiple step operation generate error.check each status value , , this is my programme, , Set rs = New Recordset , rs.CursorLocation = adUseClient , rs.Open "SELECT * FROM customer", conn, adOpenStatic, adLockOptim... |
|
 1023 Hits | |
Thread 6 of 25 | | Thread Starter | | |  RBC | Problem with VB for loginI'm struggeling getting my vb login to work. Here is my code - can anyone see anything wrong?, , Option Compare Database, Option Explicit, , Private Sub Form_Load(), ' Make sure current customer is reset when this form loads, glngUserID = 0, gintIsAdmin = False, End Sub, , Private Sub Form_Unload(Cancel As Integer), On Error GoTo Form_Unload_Err, , ' Final check when form is closing..., If glngUserID = 0 Then, ' If userid not set, then quit, DoCmd.SelectObject acTable, "tblStartup", True, End If, , , Form_Unload_Exit:, Exit Sub, , Form_Unload_Err:, MsgBox Error$, Resume Form_Unload_Exit, , End Sub, , Private Sub cmdLogin_Click(), On Error GoTo cmdLogin_Click_Err, Static intPswdCount As Integer, If Me!txtPassword = Me![cmbUser].Column(2) Or Me![cmbUser].Column(2) = "" Then, Else, MsgBox "Password you entered is incorrect.", vbCritical, "The Administrators", intPswdCount = intPswdCount + 1, If intPswd... |
 1167 Hits | |
Thread 5 of 25 | | Thread Starter | | |  mandruch | Data Environment Designer?I'm using Windows 98 and VB 6 Enterpirse edition. I can't get the Data Environment Designer to load. Am I missing something? It worked for me in class. Just can't get it to work at home? Please help..., , Thanks,, , Mike A  |
 970 Hits | |
Thread 4 of 25 | | Thread Starter | | |  tdhw | Display a field of Access DB in combo boxHi, I m new to this forum., , I got problem to display a field in Access2000 in my simple VB application which has to use combobox or imagecombobox to list the field content (movie_name). , I used adodc box to link the DB and the combobox to link the adodc. The link to DB is working as when click adodc arrow button(s), the combobox shows the movie names one by one. However, what i want is to let user click combo box to choose from a list of movie names or input a name to match the list. User will not use/see the adodc. But I now can only get one name a time (by this adodc) and there is no list showing up or only blank dropdown list when click combo box arrow. I also tried to use AddItem method in form_load code but failed with error msgs like unable to bind the field, etc., , Here is my code:, , Dim intLoop As Integer, Dim rs As ADODB.Recordset, , Set rs = adoMovie.Recordset , '(adoMovie is the adodc which connected Access 2000 DB and its RecordSource property binds with a simple SQL s... | 1 Reply: |  jdschram | i think you need to initialize intLoop = 0 |
|
 988 Hits | |
Thread 3 of 25 | | Thread Starter | | |  tophead | DataGridi would like to know how to add an inbuilt combo box with a data grid making use of the button property of the column object.., , i need only one combo box that would move up and down rows as i press the arrow keys.., can anyone help me .., , thankin u in advance |
 944 Hits | |
Thread 2 of 25 | | Thread Starter | | |  rajeshjay | printing to a pritnerhow to print some details on a form to a printer? | 1 Reply: |  tvssarma | The question is not clear, if you want to print something you can simply use the methods of printer object |
|
 1072 Hits | |
Thread 1 of 25 | | Thread Starter | | |  rajeshjay | Current row not available errorHi,, I am using VB6 and Access., and using Microsoft Grid Control to access the database., When the load the form, and click on one of the grid in my microsoft grid, control,enter a value and move to the next column in the grid, it gives me, this error -->"The current row is not available"., if i dont enter any value but tab to the next column in the same row, i dont, get this error., One more peculiarity is that,if i restart the appln , this error is not there.i.e, this error appears only during starting the application 1st,3rd,5th times, etc. This is pretty urgent. thanks for ur help., raj |
 1130 Hits | |
 |
|
|