| |

VerySource

 Forgot password?
 Register
Search
View: 1408|Reply: 9

Newbie about the doubts encountered in datawindow, please wait until

[Copy link]

2

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-10 22:20:01
| Show all posts |Read mode
I do n’t know if the category of the post I posted is correct;
Questions are as follows:
    Such a sentence: should dw_1.setTrans (sqlca) and dw_1.retrieve () be placed in the open event of the opened main window or in the itemchanged event of dw_1? The book is written in the main window, but every time I run, I say that the object name of the table I used is wrong! And put it in dw_1, there is no response to the operation;
   Personally I think it's still in the main window; but what's wrong there?
   The data link is also correct!
   Please give us more pointers; thank you first!
Reply

Use magic Report

0

Threads

100

Posts

53.00

Credits

Newbie

Rank: 1

Credits
53.00

 China

Post time: 2020-1-16 14:00:01
| Show all posts
In the open event of the main window that opens
Reply

Use magic Report

0

Threads

100

Posts

53.00

Credits

Newbie

Rank: 1

Credits
53.00

 China

Post time: 2020-1-16 17:09:01
| Show all posts
Post the specific information of the error
Reply

Use magic Report

2

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-18 13:00:02
| Show all posts
The error is this:
select error: SQLSTATE = S0002
[Microsoft] [ODBC SQL Server Driver] [SQL Server] The object name 'pub_user' is invalid
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-18 15:00:02
| Show all posts
Window open event

dw_1.setTransobject (sqlca)
dw_1.retrieve ()

Try
Reply

Use magic Report

0

Threads

10

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2020-1-18 16:45:01
| Show all posts
Should be placed in the OPEN event
The table object may be wrong. You may have made a mistake when generating the data window object.
Smear your error message and the code about the data window control. Look ~! ~
Reply

Use magic Report

0

Threads

9

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-19 00:00:01
| Show all posts
According to the error message you posted, it should still be a problem with your database connection, not where it is written.Where you write it will only affect when you trigger this code, and there will be no error message.You put it in open The event is triggered when the window is opened. Written in itemchanged, it will not be triggered when no data is retrieved, because it is triggered when the item is changed. The correct data window retrieval method should besuperricheThe way the brother said it.
In addition, according to the error prompt you posted, you should use ODBC to connect to sql server. Personally I suggest you use the dedicated channel provided by PB with sql server, so that it is better in terms of speed and stability. I think there are three problems with your problem One possibility: one is the ODBC version. When I use ODBC to connect to Access, I will report some inexplicable errors. The problem is the ODBC version. The second may be a problem with the writing of your data window. Check your data window. SQL. The third problem is your driver. I have attached the driver code for the connection with the UFIDA server below. The environment is pb6.5 and sql server2000.
// Profile lwz_test
SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "UFDATA_005_2006"
SQLCA.ServerName = "10.0.2.10"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = "CommitOnDisconnect = 'No'"
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-20 23:27:01
| Show all posts
Learn it.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-4 19:00:01
| Show all posts
Should be placed in the open event,
dw_1.settransobject(sqlca)
dw_1.retrieve()
Reply

Use magic Report

0

Threads

1

Posts

419.00

Credits

Credits
419.00

 China

Post time: 2021-4-13 11:06:18
| Show all posts
The constructor event placed in the corresponding data window, the code looks the easiest! : lol
SetTransObject (SQLCA)
Retrieve ()
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list