Showing posts with label VB Connection With Oracle. Show all posts
Showing posts with label VB Connection With Oracle. Show all posts

Tuesday, 11 July 2017

Auto variable

Auto variable "C" Language


Auto or local variable in c language is a type of variable which space allocate and deallocate space automatically and static in by nature. An auto variable is invisible from outside of a function or block. So an auto variable can be access within the block where it is defined. By default all variable in a block or function is auto by nature. Auto keyword is used to make auto variable which is optional.

Auto int a;

Or

Int a


#include<stdio.h>
void main()
{
     int a=10;

Wednesday, 10 April 2013

Connect VB 6.0 with Oracle and SQL Server

Hi...
Database is the heart of any business application. When we make any software then most of the  things floats near of database. As we know oracle is the most popular database in the world connecting oracle to your VB application is very simple simple. take a look on following and please don't tell me thanks..

  • Import a class reference for Project > References
  • Add Microsoft ActiveX Data Objecs 2.8 Library from references
  • Make an object of ADODB.Connection
  • Open DB Connection Consider the connection string
  • Rest of the things are same as you do with access database

Dim con As New ADODB.Connection
    con.Open "Provider=MSDAORA.1;User id=scott;password='tiger';Persist Security Info=False"
    con.BeginTrans
    con.Execute "insert into vb values(110,'niraj','lanka')"
    con.CommitTrans
    MsgBox "Saved"

SQL Server

Table Name Stu(Roll number,Name varchar2(20),City varchar2(20)), Import Microsoft Active Data Objects 2.0 from Project>References

Save Button Code


 con.Open "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bsw"
con.BeginTrans
    con.Execute "insert into stu values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "')"
    con.CommitTrans