Computers & Internet Logo

Related Topics:

Posted on Mar 23, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Vb 6.0 to oracle connectivity problem

When trying to execute a query like "select****" from adodcproperties-recordsource(command type -adcmdtext)-the oracle error ora-972(identifier is too long) is displayed

1 Answer

Fred Block

Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

  • Expert 289 Answers
  • Posted on Apr 22, 2009
Fred Block
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

Joined: Apr 21, 2009
Answers
289
Questions
1
Helped
166234
Points
608

Your SQL query does not look valid. Test the query in SQL Query analyzer, and then once it is working, copy it into your VB source. You will of course then need to make the query a string that VB will accept.

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

0helpful
1answer

Problem installing the ORACLE on ACER Altos G510

may be u require a different version?so download it
1helpful
1answer

Adodc1.RecordSource = ''Select * from wharfdb where entrydate>='' & ''''' & strdate1 & ''''' DataGrid1.Refresh Set DataGrid1.DataSource = Adodc2 Adodc1.Refresh DataGrid1.Refresh BUT SAME...

I think this can be the solution.

Adodc1.RecordSource = "Select * from wharfdb where entrydate>='" & strdate1 & "'"
DataGrid1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset
Adodc1.Refresh
DataGrid1.Refresh

To see how the first statement is written, see down below.
entrydate > = ' " & strdate1 & " ' "

I hope this works for you.
Greetings.
0helpful
1answer

I can't add data in the database using vb

Hi,
The database can be any like oracle.

Two type of connection u can make.
One of such connection is ADODB

The code is like

Dim ors As ADODB.Recordset
Dim oconn As Connection
Dim Qry as String
dim Qry1 as string
Set ors = New ADODB.Recordset
Set oconn = New ADODB.Connection
Chk_selectall.Visible = False

oconn.Open "Provider=MSDAORA.1;" & "user id = " & Username & _
";password = " & Password & ";data source = " & Conn_string _
& ";Persist Security Info=True"

Qry = "insert into table1 values (100,'we')"

oconn.execute "Qry"

If u select any data then u ve to use
Qry1 = "select * from table1"

ors.open "Qry1",oconn

do until ors.EOF

msgbox ors(0) & "," & ors(1)

ors.movenext;

loop
1helpful
1answer

Sir how to set a messagebox in vb.net

To display a MessageBox:

MessageBox.Show("This is your messahe text!", "Title of Your MessageBox", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

Regarding connecting to an Oracle database, you'd have to search for the connection string.
0helpful
1answer

Regarding connection in vb.net with oracle

I have uninstalled and reinstalled WordPerfect four ao five times and each timeI cannot open Wordperfect 11 or acess my documents conected to that program. Why? All the other categories under the WordPerfect!! install work OK.
0helpful
1answer

How to open the reports in excel in oracle 10g

You can create a .CSV file using Text_IO builtin.

Latest Answer : Steps:---------------1) Download rep2excel.exe from the site:- http://www.brothersoft.com/downloads/html-to-excel.html 2) the from Oracle report save the file as .html3) From command prompt run.
needs three types of queries
3 types of queries. ref cursor query, online query, execute query.

check this site might help u out
http://www.geekinterview.com/question_details/22033

good luck...
0helpful
1answer

After installing DB2 query is not executing

could you check whether you are connected to the database, where you are trying to create table,

check the database list, then connect to the database you want then execute the table creation ddl,
if no db found then create a database then proceed.
0helpful
2answers

How to connevt visual basic with oracle(sql)

You need to install oracle client on client machine, and than you can use datasource (ODBC) to connect from vb to oracle.
0helpful
1answer

Export data in excel shld yoeet through VB

When i first figured out how to pull data from SQL and put the results in an excel file i referenced these two articles....
Reading and writing excel file using VB.NET (http://www.codeproject.com/KB/vb/Work_with_Excel__VBNET_.aspx)
Get the Values From DataBase and Stored into excell Sheet (http://www.codeproject.com/KB/vb/Getvaluesfromdatabase.aspx)

This is the code i ended up using.... (check out those links to see how you need to import the ms office excel reference file with visual basic)

Const stcon As String = "Provider=SQLNCLI;server=xxxxx;database=xxxxx;uid=xxxxx;pwd=xxxxx;DataTypeCompatibility=80"
Dim stSQL As String = "select * from scs_rate_class_money where irate_book = 124 and snew_used = 'U' and sclass = '2' and splan = 'T4' and sopt_code = 'F1'"
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim fld As ADODB.Field
'Open the connection.
cnt.Open(stcon)

'Open the recordset.
With rst
.CursorLocation = ADODB.CursorLocationEnum.adUseClient
.Open(stSQL, cnt, ADODB.CursorTypeEnum.adOpenForwardOnly, _
ADODB.LockTypeEnum.adLockReadOnly , _
ADODB.CommandTypeEnum.adCmdText)
.ActiveConnection = Nothing 'Disconnect the Recordset.
End With
'Close the connection
cnt.Close ()
Dim exp As Export = New Export()
Dim xlApp As New Microsoft.Office.Interop.Excel.Application
Dim xlWBook As Microsoft.Office.Interop.Excel.Workbook = xlApp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet )
Dim xlWSheet As Microsoft.Office.Interop.Excel.Worksheet = CType(xlWBook.Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet)
Dim xlRange As Microsoft.Office.Interop.Excel.Range = CType(xlWSheet, Microsoft.Office.Interop.Excel.Worksheet).Range("A2")
Dim xlCalc As Microsoft.Office.Interop.Excel.XlCalculation
Dim i As Short

'Turn off Excel's calculation.
With xlApp
xlCalc = .Calculation
.Calculation = Microsoft.Office.Interop.Excel.XlCalculation.xlCalculationManual
End With
'Write the fieldnames.
For Each fld In rst.Fields
xlRange.Offset(0, i).Value = fld.Name
i = i + 1
Next
'Populate the range.
xlRange.Offset(1, 0).CopyFromRecordset(rst)
'Close the recordset.
rst.Close()
'Make Excel available to the user.
With xlApp
.Visible = True
.UserControl = True
'Restore the calculation mode.
.Calculation = xlCalc
End With
'Release variables from memory.
fld = Nothing
rst = Nothing
cnt = Nothing
xlRange = Nothing
xlWSheet = Nothing
xlWBook = Nothing
xlApp = Nothing
0helpful
1answer

Ms access

Stored Procedures don't exist in MS Access. You do have the following options though. Queries, which are just select or action queries. VB Code, which you can write using Query Objects as if you were writing a Visual Basic application. These can be Functions or Subroutines. In these, you would use the standard programming techniques with while and for loops, etc.

You can create complex situations combining the two of these. A function in the VB code area can accept through parameters, the single values (line by line, record by record) in a query and act on them and manipulate the values.

For example: create a query that does a select phone from address. Create a function in vb called public function StripDashesInPhone(Phone as string) which then uses VB coding to strip dashes from each phone value passed in. To make it all work, in the query on one of the field columns put "NewPhone: StripDashesInPhone([Phone])" and for every record processed in the query, the function is called with the [Phone] field value passed in to the function and the action is processed and returned.

Other than writing a function that is activated by a form button click, which opens the current db and opens a table and process it, just like in VB, this is about as close to cursors and oracle procedures as you get.

I wish it was more, but ...
Not finding what you are looking for?

160 views

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

k24674

Level 3 Expert

8093 Answers

Brad Brown

Level 3 Expert

19187 Answers

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

Answer questions

Manuals & User Guides

Loading...