Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Friday, March 30, 2012

OPENQUERY Question. How to update using 2 tables

All,

Can someone help me with the following SQL and help me write it in an
OPENQUERY format. I am running the following code from a SQL Server 7
box, trying to update a table in an Oracle Linked Server. The code
runs fine, except it takes almost an hour to complete. I know if I run
via OPENQUERY,I can get the same done in much less time.

Some of the relevant information is as follows:

ORACLE_HBCPRD04 is a linked Oracle Server.
SITEADDRESS is a table in Oracle
#SiteAddress_New is a table in SQL Server.

UPDATE ORACLE_HBCPRD04...SITEADDRESS
SET
CUST_ADDR1 = CASE WHEN SiteAddress_New.CUST_ADDR1 = '' THEN NULL
ELSE SiteAddress_New.CUST_ADDR1 END,
CUST_ADDR2 = CASE WHEN SiteAddress_New.CUST_ADDR2 = '' THEN NULL
ELSE SiteAddress_New.CUST_ADDR2 END ,
CUST_ADDR3 = CASE WHEN SiteAddress_New.CUST_ADDR3 = '' THEN NULL
ELSE SiteAddress_New.CUST_ADDR3 END,
CUST_ADDR4 = CASE WHEN SiteAddress_New.CUST_ADDR4 = '' THEN NULL
ELSE SiteAddress_New.CUST_ADDR4 END ,
CTY_NM = CASE WHEN SiteAddress_New.CTY_NM = '' THEN NULL ELSE
SiteAddress_New.CTY_NM END,
ST_ABBR = CASE WHEN SiteAddress_New.ST_ABBR = '' THEN NULL ELSE
SiteAddress_New.ST_ABBR END,
POST_CD = CASE WHEN SiteAddress_New.POST_CD = '' THEN NULL ELSE
SiteAddress_New.POST_CD END,
CNTY_NM = CASE WHEN SiteAddress_New.CNTY_NM = '' THEN NULL ELSE
SiteAddress_New.CNTY_NM END,
CNTRY_NM = CASE WHEN SiteAddress_New.CNTRY_NM = '' THEN NULL ELSE
SiteAddress_New.CNTRY_NM END,
ADDR_STAT = NULL ,
LAST_UPDATE_DATE = SiteAddress_New.LAST_UPDATE_DATE

FROM
ORACLE_HBCPRD04...SITEADDRESS SiteAddress INNER JOIN
#SiteAddress_New SiteAddress_New ON
SiteAddress.LEGACY_ADDR_ID = SiteAddress_New.LEGACY_ADDR_ID

WHERE
UPPER(SiteAddress_New.PROCESS_CODE) = 'U'

Best Regards,

addi"addi" <addi_s@.hotmail.com> wrote in message
news:6f426fb3.0406090845.6afdbf32@.posting.google.c om...
> All,
> Can someone help me with the following SQL and help me write it in an
> OPENQUERY format. I am running the following code from a SQL Server 7
> box, trying to update a table in an Oracle Linked Server. The code
> runs fine, except it takes almost an hour to complete. I know if I run
> via OPENQUERY,I can get the same done in much less time.
> Some of the relevant information is as follows:
> ORACLE_HBCPRD04 is a linked Oracle Server.
> SITEADDRESS is a table in Oracle
> #SiteAddress_New is a table in SQL Server.
> UPDATE ORACLE_HBCPRD04...SITEADDRESS
> SET
> CUST_ADDR1 = CASE WHEN SiteAddress_New.CUST_ADDR1 = '' THEN NULL
> ELSE SiteAddress_New.CUST_ADDR1 END,
> CUST_ADDR2 = CASE WHEN SiteAddress_New.CUST_ADDR2 = '' THEN NULL
> ELSE SiteAddress_New.CUST_ADDR2 END ,
> CUST_ADDR3 = CASE WHEN SiteAddress_New.CUST_ADDR3 = '' THEN NULL
> ELSE SiteAddress_New.CUST_ADDR3 END,
> CUST_ADDR4 = CASE WHEN SiteAddress_New.CUST_ADDR4 = '' THEN NULL
> ELSE SiteAddress_New.CUST_ADDR4 END ,
> CTY_NM = CASE WHEN SiteAddress_New.CTY_NM = '' THEN NULL ELSE
> SiteAddress_New.CTY_NM END,
> ST_ABBR = CASE WHEN SiteAddress_New.ST_ABBR = '' THEN NULL ELSE
> SiteAddress_New.ST_ABBR END,
> POST_CD = CASE WHEN SiteAddress_New.POST_CD = '' THEN NULL ELSE
> SiteAddress_New.POST_CD END,
> CNTY_NM = CASE WHEN SiteAddress_New.CNTY_NM = '' THEN NULL ELSE
> SiteAddress_New.CNTY_NM END,
> CNTRY_NM = CASE WHEN SiteAddress_New.CNTRY_NM = '' THEN NULL ELSE
> SiteAddress_New.CNTRY_NM END,
> ADDR_STAT = NULL ,
> LAST_UPDATE_DATE = SiteAddress_New.LAST_UPDATE_DATE
> FROM
> ORACLE_HBCPRD04...SITEADDRESS SiteAddress INNER JOIN
> #SiteAddress_New SiteAddress_New ON
> SiteAddress.LEGACY_ADDR_ID = SiteAddress_New.LEGACY_ADDR_ID
> WHERE
> UPPER(SiteAddress_New.PROCESS_CODE) = 'U'
> Best Regards,
> addi

I don't really understand your question - OPENQUERY() executes entirely on
the linked server, so it would not be possible to join to a local MSSQL
table.

It's hard to say what the issue is without knowing more about how many rows
are involved, but you might want to look at the REMOTE join hint, to see if
a remote join is faster. This may help if the MSSQL table is much smaller
than the Oracle one.

See also this post:

http://groups.google.com/groups?hl=...1.microsoft.com

Simon|||addi (addi_s@.hotmail.com) writes:
> Can someone help me with the following SQL and help me write it in an
> OPENQUERY format. I am running the following code from a SQL Server 7
> box, trying to update a table in an Oracle Linked Server. The code
> runs fine, except it takes almost an hour to complete. I know if I run
> via OPENQUERY,I can get the same done in much less time.

What you could do is to first insert the data in the temptable into a
table on the Oracle side. Then data in the target table does not have
to move forth and back across the network.

Then you would run the UPDATE statement in Oracle (with Oracle syntax).
The best method would be to so through a stored procedure, but I don't
know exactly what Oracle offers in this area.

OPERQUERY? It may work, but OPENQUERY is not intended for update statements,
but is a rowset provider. You could try:

SELECT 1 FROM OPENQUERY(ORACLE_HBCPRD04, 'UPDATE SITEADDRESS ...')

But if you try the same operation against SQL Server, this will fail
with the messages "...indicates that ... does not return any records".
And I would guess something similar will happen with Oracle. For SQL
Server I know of a poor workaround, but if there is something similar
for Oracle I don't know. Of course you could throw in a dummy SELECT
into the batch you pass to Oracle. And in any case, you will produce
a result set, which might be what calling program might expect. (You
could hide with INSERT EXEC though.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspsql

OPENQUERY and variable question

I am trying to create a stored proc that uses OPENQUERY to get data from a db2 database. Can anyone look at the code below and let me know what I am doing wrong.

This is my error msg:

Msg 156, Level 15, State 1, Line 1

Incorrect syntax near the keyword 'SELECT'.

Msg 170, Level 15, State 1, Line 2

Line 2: Incorrect syntax near ')'.

This is my code:

USE [FVDashBoard]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[spDaily_TBT_Load_OpenQuery]

as

-- define variables

declare @.FM_DT char(10)

set @.FM_DT = (SELECT CALENDAR_DT FROM dbo.PROD_SCHD WHERE(ISSUER_NO = 90)AND (CALENDAR_DT =CONVERT(VARCHAR(10), GETDATE() - 2, 120)))

declare @.remotesql nvarchar(4000)

set @.remotesql =

'select * from OPENQUERY (BACARDI, '+

'SELECT BRAND_NO FROM WRKCON.DLY_TBT_RCNCLTN_CONTROL

WHERE SOR_REC_CREAT_DT ='+@.FM_DT+ ')'

PRINT @.remotesql

EXEC (@.remotesql)

Thanks!

The second parameter of OPENQUERY (sql statement) should be string – enclosed by single quote. Try the below query..

Code Snippet

set @.remotesql =

'select * from OPENQUERY (BACARDI, '+

'''SELECT BRAND_NO FROM WRKCON.DLY_TBT_RCNCLTN_CONTROL

WHERE SOR_REC_CREAT_DT ='+@.FM_DT+ ''')'

|||

This statement

'select * from OPENQUERY (BACARDI, '+

'SELECT BRAND_NO FROM WRKCON.DLY_TBT_RCNCLTN_CONTROL

WHERE SOR_REC_CREAT_DT ='+@.FM_DT+ ')'

seems to be missing a closing parenthesis.

|||

Thanks so much for your reply.

As a follow-up question, how could I change the vaule of @.FM_DT? Currently the value of the variable is something like 2007-08-03. What I need is for the variable to be something like '2007-08-03'. Do you know of a way to do this.

Thanks for your help!

|||

You need to add a few more quotes...

Something like this:

= '''+ @.FM_DT + ''')'

Do a PRINT or SELECT on your statement until it is correct.

Wednesday, March 28, 2012

Openning an access database using ADO.NET

What is the proper way to open an access database using ADO.NET (that is, using c#) ?
I have the following code, but somehow it does not compile saying that it doesn't find the mdb file called PhoneBook :

OleDbConnection Myconnection = null;
Myconnection = new OleDbConnection(@."Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\PhoneBook");
Myconnection.Open();

What am I doing wrong here ?
All help appreciated !:)Stab in the dark:
change C:\PhoneBook to include the file extension i.e. C:\PhoneBook.mdb|||http://www.connectionstrings.comsql

Monday, March 26, 2012

OPENING FOR MAIN FRAME DEVELOPER

Mainframe developer
Duration : 6 months
Location :Raleigh, NC
Start Date :- ASAP

Skills:

Writing code using Websphere MQ in COBOL programs and 10 years of
recent experience in the design and coding of batch and CICS COBOL
programs, using VSAM files

TSO/ISPF development environment using Endevor.

Regards,
RAM
Spectraforce Technologies Inc
Tel: 919-341-3595
Fax: 919-882-1678
rmahadev@.spectraforce.com
www.spectraforce.com
About us:

SPECTRAFORCE TECHNOLOGIES INC (www.spectraforce.com) offers a powerful
suite of IT and Consulting services allowing companies to embrace the
challenges of meeting and exceeding the company's IT needs with an
aggressive Total Cost of Ownership. We enable companies to focus on
their core competencies, while we handle the integral details of
building IT solution guaranteeing quality delivery with significant
cost savings. We offer a competitive edge through our unique services
namely PrimuSourcing (Staff Augmentation Services), Offshore
Development Center (ODC), Process Quality Automation (PQA), Content
Management Services (CMS) and SmartSourcing (Global Delivery Services).
Our onsite and offshore development teams work collaboratively to offer
round the clock (24x7) dedication & maintenance support to our
customers
PLEASE REPLY WITH " REMOVE " IN THE SUBJECT LINE IF YOU WISH TO BE
REMOVED FROM MY MAILING LIST. ALSO MENTION THE EMAIL ID YOU WISH TO BE
REMOVED. We are very prompt in removing E-mail addresses from our list.Post at relevent forum

Madhivanan

RAM wrote:

Quote:

Originally Posted by

Mainframe developer
Duration : 6 months
Location :Raleigh, NC
Start Date :- ASAP
>
Skills:
>
Writing code using Websphere MQ in COBOL programs and 10 years of
recent experience in the design and coding of batch and CICS COBOL
programs, using VSAM files
>
TSO/ISPF development environment using Endevor.
>
>
Regards,
RAM
Spectraforce Technologies Inc
Tel: 919-341-3595
Fax: 919-882-1678
rmahadev@.spectraforce.com
www.spectraforce.com
About us:
>
SPECTRAFORCE TECHNOLOGIES INC (www.spectraforce.com) offers a powerful
suite of IT and Consulting services allowing companies to embrace the
challenges of meeting and exceeding the company's IT needs with an
aggressive Total Cost of Ownership. We enable companies to focus on
their core competencies, while we handle the integral details of
building IT solution guaranteeing quality delivery with significant
cost savings. We offer a competitive edge through our unique services
namely PrimuSourcing (Staff Augmentation Services), Offshore
Development Center (ODC), Process Quality Automation (PQA), Content
Management Services (CMS) and SmartSourcing (Global Delivery Services).
Our onsite and offshore development teams work collaboratively to offer
round the clock (24x7) dedication & maintenance support to our
customers
PLEASE REPLY WITH " REMOVE " IN THE SUBJECT LINE IF YOU WISH TO BE
REMOVED FROM MY MAILING LIST. ALSO MENTION THE EMAIL ID YOU WISH TO BE
REMOVED. We are very prompt in removing E-mail addresses from our list.

Opening And Closing DB in different Sub Routiens

If Someone could please show me some example VB code where i can open the my Sqlconnection in the Page_Load subroutien... and then close that SqlConnection in the Page_Unload routine. I want to be able to execute Sql command without having to re-open and re-close the connection.

Thanks,
Greg

Hello greg,

> open the my Sqlconnection in the Page_Load subroutien...
> and then close that SqlConnection in the Page_Unload routine.

the trick is declaring a private member to keep reference to the connection object. Here is some sample code:

Private Conn As SqlConnection

Protected Sub Page_Load(...)
Conn = DAL.StartConnection()
End Sub

Protected Sub Page_Unload(...)
DAL.StopConnection(Conn)
End Sub

Protected Sub Submit_Click(...)
DAL.PerformSubmit(Conn, ...)
End Sub


Btw, this is not quite recommended practice, as you may guess... ;)

In any case, HTH. -LV

|||So Then would it be better practice to just open, and close the database connection every time i make a database call. even if it might happen multiple times, and in multiple subroutiens on any given page?|||

There really is very little overhead involved with opening and closing an SqlConnection. The Connections are usually pooled, and opening and closing the connection is extremely quick. That being said, if you want to implement it, and you won't need 2 connections open at the same time, then I would implement something like:

Private Conn as SqlConnection

Private Sub DoOpen

If Conn IS NOTHING then conn=new sqlconnection({Your connect string})

if Conn.state=closed then conn.open

end sub

Protected Sub page_Unload

If Conn.state<>closed then conn.close

end sub

Then whenever you would normally open your connection, issue a call to DoOpen. That way if you don't actually need to open the connection anywhere on your page, you won't bother doing so.

|||

> So Then would it be better practice to just open, and close the database connection every time i make a database call. even if it might happen multiple times, and in multiple subroutiens on any given page?

That's common practice and works quite well in common scenarios. After all, keeping a connection open involves its own overhead, so its rather a question of balance.

Indeed, what counts more is: are you sure you need all those queries and you couldn't do the same into a single or few stored procedures? (I'm not claiming you have too many queries; this just is general advice.)

-LV

Friday, March 23, 2012

open xml output in word

I has a sproc that creates xml output using 'Select ... for xml', but I want
my code to automatically open it in Word, so the user will see the output in
word and can save it whereever they want. I tried the xp_cmdShell (after
enabling it) - either I'm not using it correctly or something.
This is what I'm doing:
declare @.RV as integer
exec @.rv = uspCatalogtoXML
xp_cmdshell 'word.exe ' + @.RV
but I know the xp_cmdShell line is wrong.
Anyone help?
Reference: http://support.microsoft.com/kb/210565
2000,2003
Reference: http://office.microsoft.com/en-us/word/HP101640101033.aspx
2007
Depending on what version of word you will need to navigate to the proper
folder and the use the winword.exe...
example :xp_cmdshell 'C:\Program Files\Microsoft Office\Office\Winword.exe
/a /w'
Problem is, I do not believe you can pass in an XML file for 2000 or 2003.
In 2007 you can use the /pxslt sitch but you will have to save the xml and
the xslt as a file first.
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.techintsolutions.com
*/
"Jane" <Jane@.discussions.microsoft.com> wrote in message
news:DC26E85E-CFFC-4A63-9989-C361B84634E0@.microsoft.com...
>I has a sproc that creates xml output using 'Select ... for xml', but I
>want
> my code to automatically open it in Word, so the user will see the output
> in
> word and can save it whereever they want. I tried the xp_cmdShell (after
> enabling it) - either I'm not using it correctly or something.
> This is what I'm doing:
> declare @.RV as integer
> exec @.rv = uspCatalogtoXML
> xp_cmdshell 'word.exe ' + @.RV
> but I know the xp_cmdShell line is wrong.
> Anyone help?
>

open xml output in word

I has a sproc that creates xml output using 'Select ... for xml', but I want
my code to automatically open it in Word, so the user will see the output in
word and can save it whereever they want. I tried the xp_cmdShell (after
enabling it) - either I'm not using it correctly or something.
This is what I'm doing:
declare @.RV as integer
exec @.rv = uspCatalogtoXML
xp_cmdshell 'word.exe ' + @.RV
but I know the xp_cmdShell line is wrong.
Anyone help?Reference: http://support.microsoft.com/kb/210565
2000,2003
Reference: http://office.microsoft.com/en-us/w...1640101033.aspx
2007
Depending on what version of word you will need to navigate to the proper
folder and the use the winword.exe...
example :xp_cmdshell 'C:\Program Files\Microsoft Office\Office\Winword.exe
/a /w'
Problem is, I do not believe you can pass in an XML file for 2000 or 2003.
In 2007 you can use the /pxslt sitch but you will have to save the xml and
the xslt as a file first.
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.techintsolutions.com
*/
"Jane" <Jane@.discussions.microsoft.com> wrote in message
news:DC26E85E-CFFC-4A63-9989-C361B84634E0@.microsoft.com...
>I has a sproc that creates xml output using 'Select ... for xml', but I
>want
> my code to automatically open it in Word, so the user will see the output
> in
> word and can save it whereever they want. I tried the xp_cmdShell (after
> enabling it) - either I'm not using it correctly or something.
> This is what I'm doing:
> declare @.RV as integer
> exec @.rv = uspCatalogtoXML
> xp_cmdshell 'word.exe ' + @.RV
> but I know the xp_cmdShell line is wrong.
> Anyone help?
>

Monday, March 12, 2012

Open Crystal Report from VB

Mr. Babu,
I want to run a crystal report from VB 6.0. What all references should I make. If possible, send me a sample code for testing.
Regards,
SatishHi,

I'm not Babu. But hope I can help you.

To call crystal report in your vb application, first you have to make reference to the following library files.

Crystal Report ActiveX Runtime Library
Crystal Report Viewer Control 9

Then you have to create objects in the folg. way.

Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

'Write this code where you want to invoke the report

----------------------
Set Report = Appl.OpenReport("report path")
Report.DiscardSavedData

'If report have parameter fields

Report.ParameterFields(1).AddCurrentValue variable1
Report.ParameterFields(2).AddCurrentValue variable2

CRViewer1.ReportSource = Report
CRViewer1.ViewReport

----------------------

Hope this will work!

Babu,

if you find any error, pls just let us know.|||Originally posted by harmonycitra
Hi,

I'm not Babu. But hope I can help you.

To call crystal report in your vb application, first you have to make reference to the following library files.

Crystal Report ActiveX Runtime Library
Crystal Report Viewer Control 9

Then you have to create objects in the folg. way.

Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

'Write this code where you want to invoke the report

----------------------
Set Report = Appl.OpenReport("report path")
Report.DiscardSavedData

'If report have parameter fields

Report.ParameterFields(1).AddCurrentValue variable1
Report.ParameterFields(2).AddCurrentValue variable2

CRViewer1.ReportSource = Report
CRViewer1.ViewReport

----------------------

Hope this will work!

Babu,

if you find any error, pls just let us know.

Hi harmonycitra,

Thank you for helping others.

We have to inform that the report (.rpt) file create from Crystal report IDE, Then we can open the report file from OpenReport() method.

Set Report = Appl.OpenReport(app.path & "\myreport.rpt")

yours friendly,
K.Babu|||hi

i m sabina..

i have same querry than i just post this.

i m using vb 6,CR 9 and M.Access..

i just write down this code and pass parameter in form .

but it give error "Parameter Field value is not in range"

plz..help me urgent..i m on deadline of project...

Thanx in Adavance
God Bless u,

Regards,
Sabina Maniar
U.A.E|||what id the value you passed to parameter?|||Hi,

I encounterd the following error msg
"Expected end of statement" at this line char 9
"Dim App As New CRAXDRT.Application"

Can anybody help me?|||Hi,
I am using VB6.0 , Access 2000,abd CR 8.0.
I am using the following code.

'Add reference to Crystal Reports x.x ActiveX Designer RunTime Library
'Add component Crystal Reports Viewer Control
'Add reference to Microsoft ActiveX Data Objects 2.8 Library
'oCnn = current open ADO connection object
Private Sub Command1_Click()

Dim oApp As CRAXDRT.Application
Dim oReport As CRAXDRT.Report
Dim oRs As ADODB.Recordset
Dim sSQL As String

sSQL = "SELECT * FROM Table1"
Set oRs = New ADODB.Recordset
Set oRs = oCnn.Execute(sSQL)
Set oApp = New CRAXDRT.Application
Set oReport = oApp.OpenReport(App.Path & "\MyReport.rpt", 1)
(1) oReport.Database.SetDataSource oRs, 3, 1
crvMyCRViewer.ReportSource = oReport
crvMyCRViewer.ViewReport

End Sub

I am getting an error report on line marked (1) that " Subscript beyond Range". I assume that this is due to declaration of oRs as Recordsat and the value required in place of oRs in the same line is "data".
I am not able to find a solution.
Can anyone please tell me how to proceed ?
Thank You,
GeoNav

Friday, March 9, 2012

Open a blank or new record set code needed.

I have an access 2003 Data access page published to the web that gets its data successfully from an MS SQL 2005 server. I need the "page when it opens" to display a new / blank record (not the first record in the table as it does by default) any pointers would be nice thanks Pete...Hi,

Im not sure if this is the best forum for this question as you say the page gets its data successfully from an MS SQL 2005 Database server.

Sorry to not be able to assist more.
|||

If you connect a table through a linked table to SQL Server, you will have to specify a primary key on the Access side, otherwise Access might not know how to update / insert new records.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thank you for your input.

I don’t want to sound confusing although I am confused! Here goes. I built the Access database with Access 2007, connecting to a 2005 SQL server. The database tables all have primary keys. The forms all function fine and I used the code in them “d0cmd on open goto newrecord” and the forms open ready for a new record concealing existing data from the users.

I then used access 2003, to create data access pages and publish them to our web site. (nice trick ha?) So far this works fine usingthe record navigator and custom built controls I can ad / edit and create new records. What I need to solve is, when I open a data access page over the internet the first record is displayed. I need the page to open and be ready to accept a new record showing all blank fields and not existing records.

The data assess page requires different coding to accomplish this than the forms and this is where I am getting lost?

|||I found the solution this was easy, open the dataaccess page in design view in access, select edit / page and set the can edit properties to false, the page opens to a blank record and will not reveal other records, just what i wanted.

Open a blank or new record set code needed.

I have an access 2003 Data access page published to the web that gets its data successfully from an MS SQL 2005 server. I need the "page when it opens" to display a new / blank record (not the first record in the table as it does by default) any pointers would be nice thanks Pete...Hi,

Im not sure if this is the best forum for this question as you say the page gets its data successfully from an MS SQL 2005 Database server.

Sorry to not be able to assist more.
|||

If you connect a table through a linked table to SQL Server, you will have to specify a primary key on the Access side, otherwise Access might not know how to update / insert new records.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thank you for your input.

I don’t want to sound confusing although I am confused! Here goes. I built the Access database with Access 2007, connecting to a 2005 SQL server. The database tables all have primary keys. The forms all function fine and I used the code in them “d0cmd on open goto newrecord” and the forms open ready for a new record concealing existing data from the users.

I then used access 2003, to create data access pages and publish them to our web site. (nice trick ha?) So far this works fine usingthe record navigator and custom built controls I can ad / edit and create new records. What I need to solve is, when I open a data access page over the internet the first record is displayed. I need the page to open and be ready to accept a new record showing all blank fields and not existing records.

The data assess page requires different coding to accomplish this than the forms and this is where I am getting lost?

|||I found the solution this was easy, open the dataaccess page in design view in access, select edit / page and set the can edit properties to false, the page opens to a blank record and will not reveal other records, just what i wanted.

Saturday, February 25, 2012

only Japanese got error from WebSphere to SQL 2000

Dear all:
Please help.
I have the java code to insert multi-language data from WebSphere in
Unix to MS SQL 2000 by using MS JDBC driver Service Pack 1 Version
2.2.0029.
All other language are ok but not Japanese.
I am sure that I input the correct Japanese in the statement before I
send the insert statement because I put the string into log file to
double check.
Does any one have a clue?
Thanks in advance
dennis_chen_canada@.hotmail.com
Dear all:
It is too bad.
I download and installed the MS SQL JDBC driver SP2.
The result is the same.
The traditional Chinese, simple Chinese, German, Franch are OK.
Only some Japanese will be garbage in the table. (some of the Charactor is ok, strange?)
more info:
- I log the sql statement before calling JDBC and it is correct Japanese letter
- I copy theis sql statement into a cold fusion (which use odbc to connection to the same MS SQL)
then run the cold fusion page, the result is OK in table
more question:
- How can I get the help from MS because the document said that this JDBC driver will be supported by MS?
It is kind of urgent.
Any help is welcome
|||dennis_chen_canada@.hotmail.com wrote:

> Dear all:
> It is too bad.
> I download and installed the MS SQL JDBC driver SP2.
> The result is the same.
> The traditional Chinese, simple Chinese, German, Franch are OK.
> Only some Japanese will be garbage in the table. (some of the Charactor is ok, strange?)
> more info:
> - I log the sql statement before calling JDBC and it is correct Japanese letter
> - I copy theis sql statement into a cold fusion (which use odbc to connection to the same MS SQL)
> then run the cold fusion page, the result is OK in table
> more question:
> - How can I get the help from MS because the document said that this JDBC driver will be supported by MS?
> It is kind of urgent.
> Any help is welcome
>
Hi. You would only get support from MS by paying for support. They rarely
answer posts here unless they can identify the poster as a paying support
customer... I suggest you try a commercial driver. Try the DataDirect driver,
because that is likely to indicate how quickly MS will provide a fixed
driver. DataDiarect made MS's free driver and will likely make the next version.
Their commercial driver is their most advanced product, so if that works, it will
show that they know the problem already. If you do buy a commercial driver you
will likely get faster support.
Joe
|||From: Dennis Chen <dennis_chen_canada@.hotmail.com>
To: joeNOSPAM@.bea.com
Subject: Re: only Japanese got error from WebSphere to SQL 2000
Dear Joe:
Thanks for your email.
I will try to get it later on.
Currrently, we are facing the urgent issue that comes from customers.
Do you have any other suggestion.
rgds,
Dennis Chen
Techinical Manager, E-Commerce Div.
www.ulead.com
|||dennis_chen_canada wrote:

> From: Dennis Chen <dennis_chen_canada@.hotmail.com>
> To: joeNOSPAM@.bea.com
> Subject: Re: only Japanese got error from WebSphere to SQL 2000
> Dear Joe:
> Thanks for your email.
> I will try to get it later on.
> Currrently, we are facing the urgent issue that comes from customers.
> Do you have any other suggestion.
> rgds,
> Dennis Chen
> Techinical Manager, E-Commerce Div.
> www.ulead.com
Call Microsoft technical support and pay them to take your case,
but don't expect rapid response because typical MS support only
has a vague idea of what Java/JDBC is, so they would eventually
pass the case on to the folks in MS who talk to the external company
that makes the driver...
I would create a standalone jdbc program that demonstrates the problem
if possible. I would suggest also trying to get support from IBM
Websphere folks. They should have some MS/JDBC experts. If you had
been using BEA's Weblogic, I would have been able to do more, and
would have solved your problem...
Joe Weinstein at BEA

>