Question about Microsoft Visual Basic Enterprise Edition 6.0 (361-00667) for PC

1 Answer

I want to programaticaly modify an SQL statement in VB6

OK I normally work out of MS Access 2000/2003, but I need to make some applications in VB6 that work with the same data.

I've already created a connection to the table and also an SQL statement withing Visual Basic. Now I want to programaticaly modify this SQL statement without writing back any queries to the original Access file.

Posted by on

  • 1 more comment 
  • steel123 Jun 16, 2009

    OK, I made some progress, but did not get what I wanted yet. I usded the following command and it worked, but only one time. If my form calls for this again it won't change the SQL command after the first change.


    variable in function:


    PhoneBook.Commands("qryPhoneBook").CommandText = strSQL

  • steel123 Jun 17, 2009

    I tried a few commands like .Execute and .Cancel, but nothing seems to work. Again, it only works the first time I declare the SQL string, but after that it won't change.

  • Anonymous Mar 22, 2014

    a vision statement for 9th grade students not making learning gains in Reading and Math

×

Ad

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    Superstar:

    An expert that got 20 achievements.

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

  • Master
  • 1,263 Answers

If I remember correctly you need to call ExecuteQuery or something similar otherwise it does not update the database.


Regards
GeWiz.

Posted on Jun 16, 2009

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

16 Answers

How can I repair a corrupted MDF files and SQL server?


Similar question has been answered here: http://www.fixya.com/support/t24364927-sql_repair_recovery_process_very

Before asking any question in the forum, first you need to search your problem.

May 12, 2014 | Microsoft Database Software A5K-02817 SQL...

Tip

How to Create and Remove SQL Server Password


SQL Server is a Microsoft product used to manage and storeinformation. It uses tables to contain large sets of records for thedatabase. Do you have a SQL server and have you ever used SQL server?Do you know how to create a SQL Server passwordto protect your data stored on SQL server? What to do if you forgetyour SQL password? Following it will introduce you how to create a SQLpassword. And it also tells you how to remove SQL Server password ifyou forget as password can be easily lost.

How to create a SQL Server password?

As we know, it is an important security measure to set a passwordfor user accounts and in particular the SA account. And it is very easyfor you to create a SQL Server password. Just follow the simpleinstructions.

1. Open the Microsoft SQL Server Management Studio program from the Start menu bar in Windows.
2. Click on the SQL Server instance on which the new user will be created.
3. Right-click the Security folder, point to New, and then click Login.
4. On the General page, enter a name for the new login in the Login name box.
5. Select SQL Server Authentication and enter a password for the login.
6. Select the password policy options that should be applied to the new login. In general, enforcing password policy is the more secure option.
7. Click the OK to complete the creation of the new user.

Sometimes it happens that you ignore or forget the systemadministrator password. What will you do if you forget SQL password andcannot access to SQL database? The effective way I know is to remove SQL Server passwordwith the help of SQL Server password remover software. MS SQL ServerPassword Unlocker is one of the good MS SQL password remover toolswhich can help you remove SQL password in a few seconds.

How to remove SQL password with Windows Password Unlocker?

MS SQL Server Password Unlocker is handy SQL Server password remover software for you to reset SQLpassword including reset SA password and other user passwords. It caneasily remove SQL Server password for Microsoft SQL Server2000/2005/2008 in a minute. You don’t need to install MS SQL Server onyour PC, and the file in master.mdf format is enough for you to removeSQL Server password and set a new one for it.
Step 1. Download and install MS SQL Server Password Unlocker, and run the application.
Step 2. Click Open to import your master.mdf file. All the user names of your MS SQL Server will be displayed.
Step 3. Select an SQL account, click Change password button.
Step 4. Type a new password, and then click OK.

This SQL account password has been reset. You can login with the newly set SQL password. Although it is easy for you to remove SQL Server passwordwith SQL password remover, it is better to keep your SQL password inheart. Or you can also write it down on a paper and keep in a safeplace.

on Sep 07, 2010 | Computers & Internet

7 Answers

How to recover SQL server mdf files?


RecoveryFix for SQL database recovery software is recover and repair MDF files components from corrupted SQL server database. This software compatible with Windows 7, Server 2008, Vista, Server 2003, XP and 2000. More details see this site: http://www.en.repairsqlserver.net/ or download this tool from http://www.en.repairsqlserver.net/free-trial.html

May 06, 2014 | Microsoft Database Software A5K-02817 SQL...

1 Answer

How to setup visual basic 6.0


  1. One of the first and best things to do is begin to understand the Visual Basic IDE (Integrated Development Environment). By understanding the IDE you will be able to develop VB programs quickly and effectively. Start by reading the Getting to know the VB6 IDE tutorial
  2. The classic first program in any language is the Hello World tutorial. As a beginner you should make sure you write this program to get your feet wet. Check out the Simple Hello World VB6 tutorial
  3. Good programmers figure out how to use a consistent naming scheme when they develop applications. The quickest way to graduate out of the beginner VB6 level is to check out the Object Types and Naming Scheme VB tutorial
  4. Variables are used in any real development. Make sure you visit the Quick Variable tutorial to see how variables work in Visual Basic 6
  5. (Optional) More In Depth Understanding variables and types in VB6
  6. When you need to make comparisons or have your program choose between options you will need to understand Visual Basic's if statements. Luckily there's a beginners tutorial that explains just that: Understanding the if conditional statement
  7. Once you grasp the basics check out this next beginner VB6 tutorial that goes more in depth into conditional statements: Understanding if statements and conditionals in VB6
  8. Need to do something repeatedly? Need to iterate through a list of things? Need to count from 1 to 1 Billion by 3's? You need to understand loops! Understanding For, Do, and while Loops
  9. Once a beginner understands how to use functions and subroutines he or she is on the road to being a full fledged VB6 guru. A solid grasp on functions and subroutines allows you to reuse code and functionality throughout your program and in future programs.Functions and Subroutines in VB6 tutorial
  10. Last but not least, begin to learn how to use all the great controls Visual Basic offers and create a great User Interface for your clients to use. Basic Graphical User Interfaces in VB6 - Tutorial
Once you have finished these tutorials you should have a very good understanding of the fundamentals of the Visual Basic 6 language and development environment. Feel free to download some more advanced tutorials and continue learning on your own. If you have any questions or comments related to this Visual Basic 6 guide please post them below.

Jan 27, 2010 | Microsoft Visual Basic 6.0 for PC

1 Answer

I want ot link my inventory database to another pc


Create user account for second system in Sql
If u want to get data by code means u need to create
connection to database by using jdbc connection string .
then write a query to acces data.
create statement
pass query to that statement
run query

Statement statement=con.createstatement();
statement.executequery(querystring);

Oct 15, 2009 | Microsoft Designing ASP.NET Applications...

5 Answers

Need Help to backup SQL database in safe mode


kindly choose the option safe mode with networking and then try.

Sep 10, 2009 | Microsoft Computers & Internet

1 Answer

Write into excel format


You can use ADO or SQL to open the excel file directly (provided it is constructed correctly, ie fields names) and write the data to it without Access.
That might be eaiser thatn converting it from Access to Excel, if that can even be done.

Feb 17, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to write jdbc connections


http://www.jdbc-tutorial.com/

window.google_render_ad();

welcome_title_image.gif Java JDBC Tutorial Java JDBC Tutorial
The JDBC ( Java Database Connectivity) API defines interfaces and classes for writing database applications in Java by making database connections. Using JDBC you can send SQL, PL/SQL statements to almost any relational database. JDBC is a Java API for executing SQL statements and supports basic SQL functionality. It provides RDBMS access by allowing you to embed SQL inside Java code. Because Java can run on a thin client, applets embedded in Web pages can contain downloadable JDBC code to enable remote database access. You will learn how to create a table, insert values into it, query the table, retrieve results, and update the table with the help of a JDBC Program example.


window.google_render_ad();
Although JDBC was designed specifically to provide a Java interface to relational databases, you may find that you need to write Java code to access non-relational databases as well.
JDBC Architecture jdbc.jpg Java application calls the JDBC library. JDBC loads a driver which talks to the database. We can change database engines without changing database code.
JDBC Basics - Java Database Connectivity Steps Before you can create a java jdbc connection to the database, you must first import the
java.sql package.
import java.sql.*; The star ( * ) indicates that all of the classes in the package java.sql are to be imported.
1. Loading a database driver,
In this step of the jdbc connection process, we load the driver class by calling Class.forName() with the Driver class name as an argument. Once loaded, the Driver class creates an instance of itself. A client can connect to Database Server through JDBC Driver. Since most of the Database servers support ODBC driver therefore JDBC-ODBC Bridge driver is commonly used.
The return type of the Class.forName (String ClassName) method is “Class”. Class is a class in
java.lang package.
try { Class.forName(”sun.jdbc.odbc.JdbcOdbcDriver”); //Or any other driver } catch(Exception x){ System.out.println( “Unable to load the driver class!” ); } 2. Creating a oracle jdbc Connection

The JDBC DriverManager class defines objects which can connect Java applications to a JDBC driver. DriverManager is considered the backbone of JDBC architecture. DriverManager class manages the JDBC drivers that are installed on the system. Its getConnection() method is used to establish a connection to a database. It uses a username, password, and a jdbc url to establish a connection to the database and returns a connection object. A jdbc Connection represents a session/connection with a specific database. Within the context of a Connection, SQL, PL/SQL statements are executed and results are returned. An application can have one or more connections with a single database, or it can have many connections with different databases. A Connection object provides metadata i.e. information about the database, tables, and fields. It also contains methods to deal with transactions.
JDBC URL Syntax:: jdbc: <subprotocol>: <subname> JDBC URL Example:: jdbc: <subprotocol>: <subname>•Each driver

Feb 01, 2009 | Microsoft Windows XP Home Edition

1 Answer

UPDATE DATA WINDOW IN PB 11 ERROR


It is probably a string column, being updated with a longer string than it can contain.
Date time columns may also cause this.
If you know the exact SQL update statement you can send it here.
If not, you may consider trapping it with Profiler.
*********CAUTION - if you have a production server with multiple customers depending on its availability, do not try profiler without guidence ********************

If you are the programmer, we may consider changing the field type or truncating the string, acording to the applicational needs.

Aug 21, 2008 | Microsoft SQL Server 2000 Standard Edition...

3 Answers

Viewing ms Sql Server database on Access


Are you familiar with "Linking" tables in Access? In Access: File --> Get External Data --> Link Tables. This will bring up a dialog box which allows you to browse to your SQL server and select the table you want.

Aug 23, 2007 | Microsoft SQL Server Standard Edition for...

Not finding what you are looking for?

Open Questions:

0 Answers

Hai everyone, I am doing a project on Attendance Monitoring. I have two tables one master table called student and another table called att to store students daily attendance. I have four comboboxes in my form, by selecting the city,area,centre and batch the respective students satisfying this condition has to be displayed in the grid apart from that i have to display another column to mark attendance. I am using datagrid and mark P for present and A for absent. When i finished marking the whole data has to be stored in att table with the current date. The next day again the same class may be selected with the next date and has to be stored again. The problem is i am not able to store each person attendance. Please help me in this regard. The att table contains fields like Code: Student_ID,Date,Attendance The student table contains fields like Code: Student_ID,City,Area,Centre,Batch,Name etc The code that i have written is like this Code: Public ac As New ADODB.Connection Public ar As New ADODB.RecordSet Private Sub Command1_Click() Set ar = ac.Execute("select student.Student_ID,att.Attendance from student,att where City = '" & Combo1.Text _ & "' AND Area = '" & Combo2.Text & "' AND Centre = '" & Combo3.Text & "' AND Batch = " & Combo4.Text & "") Dim count As Integer count = ar.RecordCount MsgBox count Set DataGrid1.DataSource = ar End Sub Private Sub Form_Load() ac.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:v-tablesStudent.mdb;Persist Security Info=False" ac.CursorLocation = adUseClient Combo1.AddItem ("CHENNAI") Combo1.AddItem ("BANGALORE") Combo2.AddItem ("GILL NAGAR") Combo2.AddItem ("CHOOLAIMEDU") Combo2.AddItem ("EGMORE") Combo2.AddItem ("SOWCARPET") Combo2.AddItem ("KOTTIVAKKAM") Combo2.AddItem ("KILPAUK") Combo2.AddItem ("MOGAPAIR") Combo3.AddItem ("RANGA NURSERY") Combo3.AddItem ("V-KIDS") Combo4.AddItem ("1") Combo4.AddItem ("2") End Sub

Jun 27, 2009 | Microsoft Visual Basic Enterprise Edition...

Microsoft Visual Basic Enterprise Edition 6.0 (361-00667) for PC Logo

Related Topics:

126 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2767 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18394 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...