Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Replying to VB.NET: MS-Access Interaction Tutorial (Part I)


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Posted 06 April 2011 - 02:10 AM

how to use access len function in VB.NET?VB.NET: MS-Access Interaction Tutorial (Part I)

hii I want to use this query in VB.NET, but I m getting error to use 'len' functio

it works in access

select  len([EMPNAME]& [DESIGNATION] &[ADDRESS])-len(replace([EMPNAME] &[DESIGNATION]&[ADDRESS],"a","")) as TOTNAme

 from tbEmp

 

can u give me solution?

-reply by keyur

Posted 15 August 2011 - 12:53 PM

It says that database is not recnogized?VB.NET: MS-Access Interaction Tutorial (Part I)

Look, I tried to connect vb 2010 and access 2007 database with your code. But when I start the program it says that database is not recnogized!If I take databaze made in access XP, and change the code to open it, it works fine... Do you know what it is?

Thanx-reply by denzel


Posted 02 March 2011 - 05:18 PM

how i connect vb.net to datagridVB.NET: MS-Access Interaction Tutorial (Part I)

 

[font=" Verdana, Arial, Tahoma, Trebuchet, sans-serif, MS, Georgia, Courier, 'Times New Roman', serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"] itride this code but it is have error[/font]

[font=" Verdana, Arial, Tahoma, Trebuchet, sans-serif, MS, Georgia, Courier, 'Times New Roman', serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"][/font]

[font=" Verdana, Arial, Tahoma, Trebuchet, sans-serif, MS, Georgia, Courier, 'Times New Roman', serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"]mports System.Data.OleDb[/font]

Public Class Form1   Dim cn As OleDbConnection   Dim cmd As OleDbCommand   Dim dr As OleDbDataReader   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click   cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|mjk3.Accdb")   cn.Open()   cmd = New OleDbCommand("select * from table1", cn)   dr = cmd.ExecuteReader   While

  dr.Read() dr.Close()   cn.Close()   End SubEnd Class

[font=" Verdana, Arial, Tahoma, Trebuchet, sans-serif, MS, Georgia, Courier, 'Times New Roman', serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"]-reply by jawad[/font][font=" Verdana, Arial, Tahoma, Trebuchet, sans-serif, MS, Georgia, Courier, 'Times New Roman', serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"][/font]

 

-reply by masarat

Posted 05 January 2011 - 08:17 PM

datagridVB.NET: MS-Access Interaction Tutorial (Part I)

I am using vb.Net 2008 I will link with ms access through vb.Net in application form I edit datagrid and some column I will also add a serch button so please help with me this program

Imports System.Data.OleDbPublic Class Form1   Dim cn As OleDbConnection   Dim cmd As OleDbCommand   Dim dr As OleDbDataReader   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click   cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|mjk3.Accdb")   cn.Open()   cmd = New OleDbCommand("select * from table1", cn)   dr = cmd.ExecuteReader   While

  dr.Read() dr.Close()   cn.Close()   End SubEnd Class

-reply by jawad

 


Posted 07 November 2010 - 01:38 PM

Setup access connection to vb.netVB.NET: MS-Access Interaction Tutorial (Part I)
'Import the following libraries
 
Imports System.Data.OleDb
Imports System.Data
 
Public Class conf   'Class name
 Dim cn As OleDbConnection
 Dim dbconn As SqlConnection
 
 Public Function conDb()
 
     cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; DataSource=give the path to your acces databaseHere;")
     cn.Open()
     Return cn
 End Function
End Class
 
'Access your data using the followingCode
 
 Try
 
         sqlStr = "select * mas_user where email ='" &TxtUserID.Text & "' and password = '" & txtPwd.Text & "'"
                        'Define your query onHere
 
         Dim scmd As New OleDbCommand(sqlStr, con.ConDb)
         dr = scmd.ExecuteReader
 
         If dr.HasRows Then
             Me.Close()
         Else
             MsgBox("invalid User name or Password")
             Me.Close()
 
         End If
 
     Catch ex As Exception
         MsgBox(ex.ToString())
     End Try
 
http://www.Itinc.Co.Uk/knowledgebase/dotnetforum/setup-connection-to-msaccess
-reply by menuka

 


Posted 04 October 2010 - 11:03 AM

vb.netVB.NET: MS-Access Interaction Tutorial (Part I)

WriteVB.Net program to search customer record using customer name or customer Id.Display customer record in Data Grid.

-reply by RANA

 


Posted 27 March 2010 - 07:44 AM

VB.NET: MS-Access Interaction Tutorial (part 2)VB.NET: MS-Access Interaction Tutorial (Part I)

Hi

I'm working with vb.Net and msaccess project.

for login window, by using datareader I'm checking database data but the condition is checking only 1 record. To check full what is condition I hav to take

or by using oledbadaptor,how to write code to check the total records in database

 

-reply by Rahul

Posted 05 December 2009 - 02:25 PM

Can work with database on a serverVB.NET: MS-Access Interaction Tutorial (Part I)

 I am using vb.Net 2005 as a front-End and Ms-Access 2000 (Mdb) database as a backend.

I'm designing a quiz application  

The problem which I am facing is that.

I would like to connect my database to a client which has my application...

In such case what is the connection string to be used for connecting the database stored on other system...????

-question by Deepak

Posted 01 December 2009 - 08:14 AM

Write an use my first DLLVB.NET: MS-Access Interaction Tutorial (Part I)

Hello!

How can I write my DLL in VB 2008 Express and use the functions in Access 2007?

I only getting error 453 

-question by Anders

Posted 25 February 2009 - 01:57 PM

can work with two databases tables at same time?VB.NET: MS-Access Interaction Tutorial (Part I)

I have an issue at job and I need to know, can VB.Net work with two databases tables at same time? If it is possible, how can I do that?

I need to load some items in a Combobox from a database table, but, each item must be different to each item in another database table (the second one Database is the current Database)

Maybe it is easier than I think, but I don't know how.


Review the complete topic (launches new window)