Question about Operating Systems

2 Answers

Vb variable error

I am connecting access database named company.mdb having fields COM_CODE, COMPANY, ADD1, ADD2, ADD3, ADD4, BOOK, PAGE

while running program all fields data but the field add2, add3, book & page showing error.

my code is below, kindly suggeste me for what is wrong in coding.

Dim strdb As Database
Dim strrs As Recordset
Private Sub EXIT_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim strdbname As String
Dim strrsname As String
strdbname = "d:\vivek\company.mdb"
strrsname = "company"
Set DB = DBEngine.OpenDatabase("D:\VIVEK\COMPANY.MDB")
Set RS = DB.OpenRecordset("COMPANY")
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
'AD2.Text = RS!ADD2
'AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
'PG.Text = RS!Page
End Sub

Posted by on

2 Answers

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Renaissance:

    An user who is expert in 3 categories / brands.

  • Master
  • 848 Answers

Vb variable error? This trouble maybe power supply or inverter boards is defective.
first you can test the voltage of the multr,and then check which part is defective.From Wisiny.com can find those parts
if you have any question,please let us know email:service@wisiny.com.thanks,we sincerely hope we can help you!
you can also check this boards whether suit you:
742GL2 715G2538 3 LEG Lenovo ADTV742GL2 Power Supply Backlight Inverter...

Posted on Jan 15, 2015

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Brigadier General:

    An expert that has over 10,000 points.

  • Master
  • 10,406 Answers

Change the code:

strdbname = "d:\vivek\company.mdb"
Set DB = DBEngine.OpenDatabase("D:\VIVEK\COMPANY.MDB")
strrsname = "company"
Set RS = DB.OpenRecordset("COMPANY")
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
'AD2.Text = RS!ADD2
'AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
'PG.Text = RS!Page
to become:

strdbname = "d:\vivek\company.mdb"
Set DB = DBEngine.OpenDatabase(strdbname )
strrsname = "company"
Set RS = DB.OpenRecordset(strrsname )
comp.Text = RS!COM_CODE
compnm.Text = RS!COMPANY
isinno.Text = RS!ISIN
AD1.Text = RS!ADD1
AD2.Text = RS!ADD2
AD3.Text = RS!ADD3
AD4.Text = RS!ADD4
BK.Text = RS!BOOK
PG.Text = RS!Page
mostly to eliminate the extra "quote" (') characters,
and to use the values you set.


Posted on Dec 02, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

4 Answers

Hello I use verifone PCCharge, when I turn it on , an error message pops : "Password backup update failed.Shutting down PCCharge payment server"


PCCharge uses Access database, which is stored in .mdb file. Locate this file. Mine was in C:\Program Files\PCCW\PCCW.mdb.

- Back up this file.

- In the same folder where you found the database, there should be a program called VISDATA.exe. Double click on it to start it.

- Go to File > Repair Database, and point it to your database file (pccw.mdb).

- It will ask you if you want to open db, say no.

- Go to File > Compact Database, and point it to your database file.

- It will ask you if you want to compact to 2.0 or 7.0. I was told to use 2.0.

- It will ask you if you want to replace database, say yes.

- For encrypt, choose No.

- For open, say No.

- Close VISDATA.exe

- Try running PC Charge now.

- If it still gives you trouble, and if you don't mind losing all your history, move the pccw.mdb file out of PC Charge folder (C:\Program Files\PCCW\). Keep it somewhere else for backup, just get it out of PC Charge folder. Now, start PC Charge again. A new database will be created.

Mar 16, 2011 | Operating Systems

1 Answer

Why do we need to declare variables?


Hi,
I'm assuming you are referring to declaring variables in Procedural programming languages such as Java. Variables need to be declared for several different reasons, some of which include helping the computer reserve space in memory for variables to be stored and it also plays a part in the various stages of converting the source code, i.e. the code that you type in VB or Java, into machine code which is a series of binary digits that the computer can actually understand. It helps the computer in debugging the code for errors. In the first stage of code conversion, lexical analysis, information about the variable names is stored. In the next stage, Syntax analysis, the code is checked to be grammatically correct according to the rules of Backus Naur Form, i.e. if a key word such as PRINT is typed in as PLINT the computer will treat this as a variable name and since no information about this variable name has been entered in the lexical analysis stage it knows that an error has been made.
Hope this helps!

Dec 11, 2010 | Operating Systems

1 Answer

Turbotax 2008


Hello There, I found this in their FAQ Guide. Hope this resolves your problems, I know it is a bit of a read. Good Luck!!

What is happening?

Double-clicking on a backup, portable company file, or a file with an extension other than .qbw, the following error occurs:
An error occurred when QuickBooks tried to create, open, or use the company file. Please try again. If the problem persists, contact Intuit Technical Support and provide them with the following error codes: (-6150,-1006).
Or, if you attempt to double-click the data file without QuickBooks open, the following error occurs:
There was an unexpected error reported while trying to run QuickBooks with company file "path location". Error code 80070057.
Note: More than one error message that includes the error code 80070057 exists. If this is not the exact wording of your error message please refer to one of these other documents:
Error: 80070057 parameter is incorrect" when clicking on a QBB, QBM, QBW, NT, or TLG file from a Google Search Timeline
Error: 80070057 parameter is incorrect" when clicking on a QBB, QBM, NT, or TLG file from a Google Search Timeline
Error: 80070057, the parameter is incorrect. There was an unexpected error reported while trying to run QuickBooks with company file [path and name]
Error: 80070057 the parameter is incorrect" and "You do not have sufficient permissions to delete files...
If your Error 80070057 is different than the ones displayed, perform a new Search.

Why is this happening:
QuickBooks cannot read the company file because the QuickBooks file extension was changed or is the wrong type (.qbm, .qbb, .qbx).
This error can also occur during conversion or creation of a backup or portable company file if QuickBooks detects data damage in the company file.
This error may possibly occur if the QuickBooks installation is damaged.
This error can also be caused by attempting to open the portable company file (.qbm) without having QuickBooks open.

How to fix the problem:
Verify that the file extension displays company name.qbw and not a shortcut.
Copy the company file, change the extension to .qbm, .qbb, or .qbx, and follow the appropriate steps to open a portable file, backup, or accountant's review.
If the error occurs during the conversion or creation of a backup or portable company file, run the Verify utility to check the file for data damage. If it finds damage, run the Rebuild utility.
Repair the QuickBooks installation.
Uninstall, and then reinstall QuickBooks.

Sep 25, 2009 | Microsoft Windows XP Home Edition

1 Answer

The connection to the company file has been lost Quickbooks must close immediately. Any unsaved data will need to be re-entered. My Company file is damaged and i have tried opening it on the another...


You will need to verify and rebuild your data file. Please follow the steps i provided, this will guide you threw the process.

Verify your data:

1. Close and reopen QuickBooks to create a new Qbwin.log file.
2. Choose Window > Close All, so that no company files or QuickBooks windows are open.
3. Choose File > Utilities > Verify Data.
* If you see QuickBooks detected no problems with your data, your data is clean. Click OK.
* If you see Your data has lost integrity, your data file is damaged. Run the Rebuild Data utility to repair the damage. You may need to run Rebuild two or more times to repair all of the damage. Rerun the Verify Data utility after each rebuild to verify that the errors have been corrected.
* If your see A data problem prevents QuickBooks from continuing, then your data file has a structural problem. Run the Rebuild Data utility to repair the damage.

Rebuild your data:

Important: If the company file is on a network drive, copy the file to a local computer before attempting to run this utility. Be prepared for this computer to be unavailable for several hours running the Rebuild utility. Never rebuild or update a company data file that is located on a remote drive (for example, by accessing it over your network).

If you can't open QuickBooks to run the Rebuild Data utility refer to QuickBooks does not open.

If you're unable to open your company file when double-clicking your QuickBooks desktop icon, see Opening QuickBooks when troubleshooting.

To rebuild the file:

1. Choose Window > Close All.
2. Choose File > Utilities > Rebuild Data.
3. Click OK to the warning message requiring a backup of the company file before starting the rebuild.

Important: Do not replace your current backup. Intuit recommends using a newly formatted external media source for this backup (such as a CD or DVD). If necessary, back up to your local hard drive.
If a message appears asking if you want to replace the backup file, click No.
To avoid overwriting the current file, enter a new name in the Filename field.

4. At the bottom of the QuickBooks Backup window, click OK.

Important: If the backup process fails, at the Rebuild prompt, click Cancel.
Do not continue the Rebuild process with your original company file if the back up process does not complete successfully. This can lead to permanent data loss.
You must make a copy of the company file and attempt the Rebuild process again using the copy of the company file.
Rename the copy of the company file with a unique name to avoid confusion with the original file.

5. The Rebuild Data utility starts as soon as the backup process completes. Click OK to the Rebuild has completed message.
6. Close the company file, and then reopen it to refresh the lists in the file:
1. Choose File > Close Company.
2. Open the company file:
* QuickBooks 2008 and 2007: Choose File > Open or Restore Company. Then select Open a company file and click Next.
* QuickBooks 2006: Choose File > Open Company.
7. Click the company file, and click Open.
8. Run the Verify Data utility.

Sep 22, 2009 | Operating Systems

2 Answers

Please send me the code to link two forms of a project file...actually i wanted to to transfer a variable value from one form to another...please forward code as soon as possible


if this is vb 6 then you should be able to access the other variable by using the other forms name so if you are in form1 and want to access a variable in form2

form2.variable_name

and visa versa

If this is another language then it may differ

Apr 30, 2009 | Operating Systems

1 Answer

How to create crystal report in asp.net with vb script code


You can open the Crystal Report (should be installed with Visual Studio first) after you designed your database, then you have to connect the Crystal Report to the right database (the one which you store financial information in your case), then you can create your report easily by putting the desired variables and designs. Then you have to call for that report with a code within visual basic.

Apr 15, 2009 | Operating Systems

1 Answer

How to connect vb with ms access


se Adodc OR Even better.. ADODB. for this you need to get MDAC fromMicrosoft free download.(check under project_References- Microsoft DataActiveX objects.. the current no is 2.8. if it is not there download invb directory.

next, you can learn about creating a DSN from control panel, ODBC. onceyou learn this, connection becomes a piece of cake. get some free vbtutoriasl from WWW.

then

you need to use DAO or ADO to connect to the database. better study both but since ADO is current, i am showing that code.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string
Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub
and for adding records:
say let us say you have 3 fields. then have 3 textboxes and 1 command button on the form.

private command1_click()
esql1="select * from Yourtablename"
rec.open(esql1),conn,, adOpenDynamic, adLockOptimistic
rec.AddNew
rec.Fields(0) = text1.Text
rec.Fields(1) = Text2.text
rec.Fields(2) = text3.text
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.
rec.update
if not rec.eof then rec.movenext
rec.close
conn.close
set conn to nothing
end sub

this will add new records to access table from VB.
' for picture store the full path of the path and the picture file nameint the text field. and in the picturebox of VB form for viewingrecords again you need ADO or ADODC and here you code:picture1.picture=Loadpicture(rec.fields(3) ' depending on where thepicture field is located. you need to make a few trials.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string

Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub

and for accessing records:

private command1_click()
esql1="select * from Yourtablename where id =" & val(text1) ' for integers

esql1="select * from Yourtablename where name=" & "'" & text1 & "'" ' for string

rec.open(esql1),conn, adOpenstatic, adLockreadonly

label1.caption =rec.Fields(0)
label2.caption= rec.Fields(1)
label3.caption= rec.Fields(2)
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.

rec.close
conn.close
set conn to nothing
end sub


' similarly there are routines to ADD, Delete, Edit, View etc.

Feb 26, 2009 | Operating Systems

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

1. A software company has the following information about its cl


Shouldn't you be doing your own school homework?

Nov 18, 2008 | Operating Systems

1 Answer

Executing VB application from shared drive


I donot have much expertise on the subject but I think you can do the same by connecting your Database through ODBC connectivity than direct connection. In that way your database will be only on one Server and all can use the same by just using the program from their own console.

Feb 04, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

240 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...