Jump to content
View in the app

A better way to browse. Learn more.

கருத்துக்களம்

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB6.0 கணிணியளர்கள் யாராவது உதவி செய்வீர்களா நன்றி..

Featured Replies

  • கருத்துக்கள உறவுகள்

VB6.0 யாராவது உதவமுடியுமா?

கல்லூரி காலத்திலேயே இந்த VB6.0 ஏறக்கட்டியாகிவிட்டது... பழைய மென் பொருள் ஒன்று இடபற்றாக்குறையினால் (msaccess-database) மாறுதலுக்காக(mysql) என்னிடம் வந்துள்ளது... சிக்கல் என்ன வென்றால் ADODB முறையில் இவ்வாறு query எழுதியே database table

rs.Open "insert into independent values( '" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & Text28.Text & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

திறக்க முடிகிறது...

DAO இதில் நேரடியாக இந்த முறையினாலே database table திறக்க முடிகிறது ...

Set DB = OpenDatabase("C:\xx.mdb")

Set rs = DB.OpenRecordset("independent", dbOpenDynaset)

query எழுதாமல் ADODB முறையினாலும் நேரடியாக இவ்வாறு database table திறக்க முடியுமா? ஏதாவது வழி உள்ளதா?

VB6.0 கணிணியளர்கள் யாராவது உதவி செய்வீர்களா நன்றி..

நன்றி...

Edited by புரட்சிகர தமிழ்தேசியன்

  • 2 weeks later...
  • கருத்துக்கள உறுப்பினர்கள்

VB6.0 யாராவது உதவமுடியுமா?

கல்லூரி காலத்திலேயே இந்த VB6.0 ஏறக்கட்டியாகிவிட்டது... பழைய மென் பொருள் ஒன்று இடபற்றாக்குறையினால் (msaccess-database) மாறுதலுக்காக(mysql) என்னிடம் வந்துள்ளது... சிக்கல் என்ன வென்றால் ADODB முறையில் இவ்வாறு query எழுதியே database table

rs.Open "insert into independent values( '" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & Text28.Text & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

திறக்க முடிகிறது...

DAO இதில் நேரடியாக இந்த முறையினாலே database table திறக்க முடிகிறது ...

Set DB = OpenDatabase("C:\xx.mdb")

Set rs = DB.OpenRecordset("independent", dbOpenDynaset)

query எழுதாமல் ADODB முறையினாலும் நேரடியாக இவ்வாறு database table திறக்க முடியுமா? ஏதாவது வழி உள்ளதா?

VB6.0 கணிணியளர்கள் யாராவது உதவி செய்வீர்களா நன்றி..

நன்றி...

Try This

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open "Path/database name"

If not working, please explain a bit more what you actually trying to do.

More explanation can be found at, http://msdn.microsoft.com/en-us/library/aa141406(office.10).aspx

  • தொடங்கியவர்
  • கருத்துக்கள உறவுகள்

ஆம் உதவிக்கு நன்றி தோழர் பாண்டியன்... தாங்கள் இணைத்ததில் பார்த்தீர்கள் என்றால் bold செய்யப்பட்டுள்ளது... அதில்

your code:

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open "Path/database name"

ex:

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open "c:\Nwind.mdb""

நேரடியாக கணிணியில் c: drive இருக்கும் c:\Nwind.mdb எனும் database access செய்யமுடிகிறது... அதே போல் நேரடியாக ... sql server... mysql.. *.mdf database திறக்கவேண்டும்.....Not by ODBC connection..... அதுவே தோழர்.எனது தேவை... sql query எழுதி திறக்க கூடாது..

as your code its possible to open ms server path of mdf files ???

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open c:\program files\mssqlserver\data\xx.mdf

This is my code:

இது ADODB முறையினால் database table திறந்து textbox value க்களை உள்ளே தள்ளும் முறை...

Dim CN As ADODB.Connection

Dim rs As ADODB.Recordset

Set CN = New ADODB.Connection

Set rs = New ADODB.Recordset

CN.Open "driver={SQL Server};server=(local);uid=;pwd=;database=xx;"

rs.Open "insert into commercial values( '" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & "','" & Combo2.Text & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

MsgBox"Datas updated"

இது DAO முறையினால் database table திறந்து textbox value க்களை உள்ளே தள்ளும் முறை...

Dim DB As DAO.Database, rs As DAO.Recordset

Set DB = OpenDatabase("C:\xx.mdb")

Set rs = DB.OpenRecordset("independent", dbOpenDynaset)

rs.MoveLast

rs.AddNew

rs.Fields(0) = Trim(Text1.Text)

rs.Fields(1) = Trim(Text2.Text)

rs.Fields(2) = Combo1.Text

rs.Fields(3) = Combo2.Text

rs.Update

MsgBox"Datas updated"

சுருங்க கூறின் எனக்கு ADODB முறையில் if rs=recordset....... then... rs.edit ... rs.addnew... rs.update உபயோகிக்க வேணும் அப்படி ஒரு code இருந்தால் அதை பதியுங்கள் தோழர் பாண்டியன் ..

mt2ip3.jpg

எனெனில் என்னிடம் upgrade வந்துள்ள இந்த RealEstateமென்பொருள் எல்லாம் DAO ... rs.addnew.. rs.edit.. rs..update முறையில் உள்ளன அதை மாற்றாமல்... அப்படியே வைத்து எதாவது செய்யவேண்டும் என நினைக்கிறேன்... ஒவ்வொரு ADDNEW.. EDIT.. DELETE ...BUTTON க்கும் insert into ... delete from.. என sql query எழுதி கொண்டிருந்தால் நேரம் அதிகமாகும்...

மிக்க நன்றி...

Edited by புரட்சிகர தமிழ்தேசியன்

  • கருத்துக்கள உறுப்பினர்கள்

ஆம் உதவிக்கு நன்றி தோழர் பாண்டியன்... தாங்கள் இணைத்ததில் பார்த்தீர்கள் என்றால் bold செய்யப்பட்டுள்ளது... அதில்

your code:

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open "Path/database name"

ex:

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open "c:\Nwind.mdb""

நேரடியாக கணிணியில் c: drive இருக்கும் c:\Nwind.mdb எனும் database access செய்யமுடிகிறது... அதே போல் நேரடியாக ... sql server... mysql.. *.mdf database திறக்கவேண்டும்.....Not by ODBC connection..... அதுவே தோழர்.எனது தேவை... sql query எழுதி திறக்க கூடாது..

as your code its possible to open ms server path of mdf files ???

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open c:\program files\mssqlserver\data\xx.mdf

This is my code:

இது ADODB முறையினால் database table திறந்து textbox value க்களை உள்ளே தள்ளும் முறை...

Dim CN As ADODB.Connection

Dim rs As ADODB.Recordset

Set CN = New ADODB.Connection

Set rs = New ADODB.Recordset

CN.Open "driver={SQL Server};server=(local);uid=;pwd=;database=xx;"

rs.Open "insert into commercial values( '" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & "','" & Combo2.Text & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

MsgBox"Datas updated"

இது DAO முறையினால் database table திறந்து textbox value க்களை உள்ளே தள்ளும் முறை...

Dim DB As DAO.Database, rs As DAO.Recordset

Set DB = OpenDatabase("C:\xx.mdb")

Set rs = DB.OpenRecordset("independent", dbOpenDynaset)

rs.MoveLast

rs.AddNew

rs.Fields(0) = Trim(Text1.Text)

rs.Fields(1) = Trim(Text2.Text)

rs.Fields(2) = Combo1.Text

rs.Fields(3) = Combo2.Text

rs.Update

MsgBox"Datas updated"

சுருங்க கூறின் எனக்கு ADODB முறையில் if rs=recordset....... then... rs.edit ... rs.addnew... rs.update உபயோகிக்க வேணும் அப்படி ஒரு code இருந்தால் அதை பதியுங்கள் தோழர் பாண்டியன் ..

mt2ip3.jpg

எனெனில் என்னிடம் upgrade வந்துள்ள இந்த RealEstateமென்பொருள் எல்லாம் DAO ... rs.addnew.. rs.edit.. rs..update முறையில் உள்ளன அதை மாற்றாமல்... அப்படியே வைத்து எதாவது செய்யவேண்டும் என நினைக்கிறேன்... ஒவ்வொரு ADDNEW.. EDIT.. DELETE ...BUTTON க்கும் insert into ... delete from.. என sql query எழுதி கொண்டிருந்தால் நேரம் அதிகமாகும்...

மிக்க நன்றி...

====================================================================================================

Here is the sample code I worked around for you.

Under SQL SERVER ---> NorthWind Database --> create a table called --> tblTest and add fields called, RecID, Name, NumberID (I have made all fields to nvarchar) -- just for testing purpose.

Dim CN As ADODB.Connection

Dim rs As ADODB.Recordset

Private Sub Command1_Click()

Set CN = New ADODB.Connection

Set rs = New ADODB.Recordset

CN.ConnectionString = "driver={SQL Server};server=server name;uid=;pwd=;database=NorthWind;"

CN.Open

''''''''''''''''''The commented code below also works OK '''''''''''''''''''''

'strRs = "select * From tblTest"

'

'

' rs.CursorType = adOpenDynamic

' rs.CursorLocation = adUseClient

' rs.LockType = adLockPessimistic

' rs.Open strRs, CN

'

'rs.AddNew

'rs.Fields("RecID") = "00022"

'rs.Fields("Name") = "TEST22"

'rs.Fields("NumberID") = "022"

'rs.Update

rs.Open "select * From tblTest", CN, adOpenDynamic, adLockOptimistic

rs.AddNew

rs("RecID").Value = "00033"

rs("Name").Value = "test33"

rs("NumberID").Value = "33"

rs.Update

MsgBox "Record has been added successfully"

rs.Close

CN.Close

End Sub

Sorry, I am not bothered to write in tamil as I am busy with other stuff.

  • தொடங்கியவர்
  • கருத்துக்கள உறவுகள்

====================================================================================================

Here is the sample code I worked around for you.

Under SQL SERVER ---> NorthWind Database --> create a table called --> tblTest and add fields called, RecID, Name, NumberID (I have made all fields to nvarchar) -- just for testing purpose.

Dim CN As ADODB.Connection

Dim rs As ADODB.Recordset

Private Sub Command1_Click()

Set CN = New ADODB.Connection

Set rs = New ADODB.Recordset

CN.ConnectionString = "driver={SQL Server};server=server name;uid=;pwd=;database=NorthWind;"

CN.Open

''''''''''''''''''The commented code below also works OK '''''''''''''''''''''

'strRs = "select * From tblTest"

'

'

' rs.CursorType = adOpenDynamic

' rs.CursorLocation = adUseClient

' rs.LockType = adLockPessimistic

' rs.Open strRs, CN

'

'rs.AddNew

'rs.Fields("RecID") = "00022"

'rs.Fields("Name") = "TEST22"

'rs.Fields("NumberID") = "022"

'rs.Update

rs.Open "select * From tblTest", CN, adOpenDynamic, adLockOptimistic

rs.AddNew

rs("RecID").Value = "00033"

rs("Name").Value = "test33"

rs("NumberID").Value = "33"

rs.Update

MsgBox "Record has been added successfully"

rs.Close

CN.Close

End Sub

Sorry, I am not bothered to write in tamil as I am busy with other stuff.

நன்றி தோழர் பாண்டியன் தங்கள் உதவிக்கு பார்த்தீர்கள் என்றால் எனக்கு இந்த rs.Open "select * From tblTest", query ல் rs.AddNew வேலை செய்யவில்லை... அதாவது database table இன் உள்ளே values செல்லவில்லைஆயினும் MsgBox "Record has been added successfully" மாத்திரம் வேலை செய்யுது... போகட்டும் நான் அனைத்து codes மாற்றிவிட்டேன் ..தங்களின் சிரத்தைக்கு நன்றி...நன்றி தோழர் பாண்டியன்....

Edited by புரட்சிகர தமிழ்தேசியன்

வீபி எனக்கு இப்போது டச்சப்பில் இல்லை. பு.த.தே, பாண்டியன் இருவரும் இணைத்த குறியீடுகளை கிரகித்துக்கொள்ள முயற்சித்தேன். பயனுள்ள பதிவு. வாழ்த்துகள்.

  • கருத்துக்கள உறுப்பினர்கள்

நன்றி தோழர் பாண்டியன் தங்கள் உதவிக்கு பார்த்தீர்கள் என்றால் எனக்கு இந்த rs.Open "select * From tblTest", query ல் rs.AddNew வேலை செய்யவில்லை... அதாவது database table இன் உள்ளே values செல்லவில்லைஆயினும் MsgBox "Record has been added successfully" மாத்திரம் வேலை செய்யுது... போகட்டும் நான் அனைத்து codes மாற்றிவிட்டேன் ..தங்களின் சிரத்தைக்கு நன்றி...நன்றி தோழர் பாண்டியன்....

You are always welcome, புரட்சிகர தமிழ்தேசியன்'

  • தொடங்கியவர்
  • கருத்துக்கள உறவுகள்

நன்றி தோழர் பாண்டியன்.. இந்த code ....நானாக முயற்சித்தது... நன்றாகவே வேலை செய்யுது தோழர்... நன்றி... :)

Option Explicit

Dim CN As ADODB.Connection

Dim rs As ADODB.Recordset

Dim rs1 As ADODB.Recordset

Private Sub Command1_Click()

Dim a As String

rs.Open "insert into commercial values( '" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Trim(Text5.Text) & "','" & Text6.Text & "','" & Text7.Text & "','" & Text8.Text & "','" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & "','" & Text12.Text & "','" & Text13.Text & "','" & Text14.Text & "','" & Text15.Text & "','" & Text16.Text & "','" & Combo3.Text & "','" & Text17.Text & "','" & Text18.Text & "','" & Text19.Text & "','" & RichTextBox1.Text & "','" & RichTextBox2.Text & "','" & Text20.Text & "','" & Text21.Text & "','" & Text22.Text & "','" & Text23.Text & "','" & Text24.Text & "','" & Text31.Text & "','" & Text25.Text & "','" & Text26.Text & "','" & Text27.Text & "','" & Text28.Text & "','" & Text29.Text & "','" & Text30.Text & "','" & RichTextBox3.Text & "','" & Text32.Text & "','" & Text33.Text & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

a = "-Nil-"

rs1.Open "insert into pfeedback values( '" & Text25.Text & "' ,'" & Text27.Text & "','" & Text28.Text & "','" & Text32.Text & "','" & Combo1.Text & "','" & Combo2.Text & "','" & Text2.Text & "','" & a & "','" & a & "','" & a & "','" & a & "','" & a & "') ", CN, adOpenStatic, adLockBatchOptimistic, ADODB.CommandTypeEnum.adCmdText

MsgBox "successfully updated"

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Text7.Text = ""

Text8.Text = ""

Text9.Text = ""

Text10.Text = ""

Text11.Text = ""

Text12.Text = ""

Text13.Text = ""

Text14.Text = ""

Text15.Text = ""

Text16.Text = ""

Text17.Text = ""

Text18.Text = ""

Text19.Text = ""

RichTextBox1.Text = ""

RichTextBox2.Text = ""

Text20.Text = ""

Text21.Text = ""

Text22.Text = ""

Text23.Text = ""

Text24.Text = ""

Text31.Text = ""

Text25.Text = ""

Text26.Text = ""

Text27.Text = ""

Text28.Text = ""

Text29.Text = ""

Text30.Text = ""

RichTextBox3.Text = ""

Text32.Text = ""

Text33.Text = ""

End Sub

Private Sub Command2_Click()

Form5.Hide

MDIForm1.Show

End Sub

Private Sub Command3_Click()

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Text7.Text = ""

Text8.Text = ""

Text9.Text = ""

Text10.Text = ""

Text11.Text = ""

Text12.Text = ""

Text13.Text = ""

Text14.Text = ""

Text15.Text = ""

Text16.Text = ""

Text17.Text = ""

Text18.Text = ""

Text19.Text = ""

RichTextBox1.Text = ""

RichTextBox2.Text = ""

Text20.Text = ""

Text21.Text = ""

Text22.Text = ""

Text23.Text = ""

Text24.Text = ""

Text31.Text = ""

Text25.Text = ""

Text26.Text = ""

Text27.Text = ""

Text28.Text = ""

Text29.Text = ""

Text30.Text = ""

RichTextBox3.Text = ""

Text32.Text = ""

Text33.Text = ""

End Sub

Private Sub Form_Load()

Combo1.AddItem ("Flat")

Combo1.AddItem ("PenHouse")

Combo1.AddItem ("BuilderFloor")

Combo2.AddItem ("Rent")

Combo2.AddItem ("Sale")

Combo2.AddItem ("Lease")

Combo3.AddItem ("Full")

Combo3.AddItem ("Semi")

Combo3.AddItem ("Un")

Set CN = New ADODB.Connection

Set rs = New ADODB.Recordset

Set rs1 = New ADODB.Recordset

CN.Open "driver={SQL Server};server=(local);uid=;pwd=;database=xxx;"

End Sub

Archived

This topic is now archived and is closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.